-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b3bf383
commit 1b546bb
Showing
17 changed files
with
217 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<svg | ||
{...Astro.props} | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="100" | ||
height="100" | ||
fill="currentColor" | ||
viewBox="0 0 100 100" | ||
> | ||
<path | ||
fill-rule="evenodd" | ||
d="M20.596 68.123h-6.571L14 68.1l34.163-38.17L50 27.878l1.837 2.052L86 68.1l-.025.023h-6.571L50 35.269 20.596 68.123Zm32.211-10.177a2.807 2.807 0 1 1-5.614 0 2.807 2.807 0 0 1 5.614 0Z" | ||
clip-rule="evenodd"></path> | ||
</svg> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
--- | ||
import Logo from "./Logo.astro"; | ||
import Favicon from "./Favicon.astro"; | ||
--- | ||
|
||
<a href="/" class="pt-1 drop-shadow-[0_0_2px_white]"> | ||
<Logo width={125} class="text-foreground" /> | ||
</a> | ||
<a href="/" class="pt-1"><Favicon class="text-foreground" width={40} /> </a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
title: Configuration | ||
description: Simple config options to manage atmx | ||
sidebar: | ||
order: 3 | ||
--- | ||
|
||
atmx uses a simple JSON configuration file called `utils.json` to manage its files. This file is generated during `atmx init` and shouldn't be removed, otherwise atmx may not work properly. | ||
|
||
## `ts` | ||
|
||
Denotes whether the project should use [TypeScript](https://typescript.org). This value is set automatically if atmx detects a `tsconfig.json` file in your repository. | ||
|
||
## `aliases` | ||
|
||
Maps aliases for all installed code. A key is required for each atmx code type (hooks, helpers, etc.). These aliases will be used in all code atmx generates. In TypeScript aliases are typically defined using the [`paths` option](https://www.typescriptlang.org/tsconfig/#paths) in `tsconfig.json`. | ||
|
||
If you aren't using TypeScript, you'll need to configure aliases specific to your bundler. For example, Vite features a [resolve.alias](https://vitejs.dev/config/shared-options.html#resolve-alias) configuration option. | ||
|
||
## `index` (experimental) | ||
|
||
Controls whether to generate an `index.(ts|js)` file in the root each directory. For example, instead of importing a method via: | ||
|
||
```ts | ||
import { group } from '@/helpers/group'; | ||
``` | ||
|
||
You could import via | ||
|
||
```ts | ||
import * as _ from '@/helpers'; | ||
|
||
// Later... | ||
|
||
_.group(/* ... */) | ||
``` | ||
|
||
Defaults to `false`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
title: Contributing | ||
description: We'd love your help! | ||
sidebar: | ||
order: 5 | ||
--- | ||
|
||
If you'd like to contribute to atmx by submitting helpful code snippets, simply add a TSDoc-annotated function to the appropriate category in `packages/registry/src`. Documentation will automatically be generated and your function will be immediately available once you [merge your PR](https://github.com/Nickersoft/atmx/pulls). | ||
|
||
What we currently need help with the most is merging in more React hooks from [react-use](https://github.com/streamich/react-use) and [usehooks](https://github.com/uidotdev/usehooks). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
title: Installation | ||
description: Setup your project in one command | ||
sidebar: | ||
order: 1 | ||
--- | ||
|
||
Similar to how shadcn generates a `components.json` file, atmx relies on a `utils.json` file to manage its code snippets and requires this file to run. | ||
|
||
To start, run the following from the root of your repo: | ||
|
||
```bash | ||
npx atmx init | ||
``` | ||
|
||
*For alternatives to using npx, see the [CLI docs](/cli).* | ||
|
||
During initialization, you'll be asked a series of questions regarding where you wish to store different categories of code (helpers, hooks, etc.). For now, all of these fields are required, even if you aren't using React or Svelte. | ||
|
||
If your project is using TypeScript and contains a `tsconfig.json`, atmx's `ts` setting will automatically be set to `true`. Otherwise, you'll be asked if you wish to use TypeScript. **Note that selecting yes will _not_ set up TypeScript for you in your repo if it is not already.** | ||
|
||
## Configuring aliases | ||
|
||
Once you have set aliases in your `utils.json`, you'll need to update your project aliases to point to the correct paths. If you are using [NextJS](https://nextjs.org), aliases should work out-of-the-box, as Next automatically aliases `@/` to `src/*`. | ||
|
||
If not, be sure to add the following to your `tsconfig.json` (if using TypeScript): | ||
|
||
```json {4-9} | ||
{ | ||
"compilerOptions": { | ||
// ... | ||
"baseUrl": ".", | ||
"paths": { | ||
"@/*": [ | ||
"./src/*" | ||
] | ||
} | ||
// ... | ||
} | ||
} | ||
``` | ||
|
||
Otherwise, add a similar alias to your bundler. For example, [here](https://vitejs.dev/config/shared-options.html#resolve-alias) is how you would configure aliases in Vite. |
Oops, something went wrong.