@mayrlabs/setup-project 0.1.3 โ 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/LICENSE +21 -0
- package/README.md +18 -47
- package/dist/index.js +755 -271
- package/dist/index.mjs +872 -282
- package/dist/licenses/Apache-2.0.txt +190 -0
- package/dist/licenses/ISC.txt +15 -0
- package/dist/licenses/MIT.txt +21 -0
- package/package.json +9 -2
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 MayR Labs
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,65 +1,36 @@
|
|
|
1
1
|
# @mayrlabs/setup-project
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Interactive CLI to verify and configure common project tools for modern JavaScript/TypeScript applications.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
|
-
- **
|
|
8
|
-
- **
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- **
|
|
15
|
-
|
|
16
|
-
- Creates configuration files (`.prettierrc`, `.eslintrc.json`, `.lintstagedrc`, etc.).
|
|
17
|
-
- Sets up `pre-commit` hooks.
|
|
18
|
-
- Generates typesafe environment validation files (`env.ts` or `env/server.ts` + `env/client.ts`).
|
|
7
|
+
- ๐ถ **Husky**: Set up git hooks effortlessly.
|
|
8
|
+
- ๐
**Formatter**: Choose between **Prettier** or **Oxfmt**.
|
|
9
|
+
- ๐งน **Linter**: Choose between **ESLint** or **Oxlint**.
|
|
10
|
+
- ๐ซ **Lint-staged**: Automatically lint/format staged files with broad extension support.
|
|
11
|
+
- ๐ณ **Env Validation**: Set up **@t3-oss/env** for Next.js, Nuxt, or Core, with optional presets.
|
|
12
|
+
- ๐งช **Testing**: Configure **Vitest** or **Jest**.
|
|
13
|
+
- โ๏ธ **EditorConfig**: Generate standardized `.editorconfig` files.
|
|
14
|
+
- ๐ **License**: Generate MIT, ISC, or Apache-2.0 licenses.
|
|
15
|
+
- ๐ก๏ธ **Git Safety**: Checks for uncommitted changes before making modifications.
|
|
19
16
|
|
|
20
17
|
## Usage
|
|
21
18
|
|
|
22
|
-
Run the following command in your project
|
|
19
|
+
Run the following command in your project directory:
|
|
23
20
|
|
|
24
21
|
```bash
|
|
25
22
|
npx @mayrlabs/setup-project@latest
|
|
26
23
|
```
|
|
27
24
|
|
|
28
|
-
|
|
25
|
+
The CLI will guide you through an interactive survey to select the tools you want to configure. No changes are made until you confirm the summary at the end.
|
|
29
26
|
|
|
30
|
-
|
|
31
|
-
> This tool modifies configuration files. It is recommended to use it on a fresh project or commit your changes before running it.
|
|
27
|
+
## How it works
|
|
32
28
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
- Initializes Husky.
|
|
38
|
-
- Options to set up `lint-staged` or a custom script as a pre-commit hook.
|
|
39
|
-
|
|
40
|
-
### Formatter
|
|
41
|
-
|
|
42
|
-
- Choose between **Prettier** and **Oxfmt**.
|
|
43
|
-
- Generates standard configuration.
|
|
44
|
-
|
|
45
|
-
### Linter
|
|
46
|
-
|
|
47
|
-
- Choose between **ESLint** and **Oxlint**.
|
|
48
|
-
- Generates standard configuration.
|
|
49
|
-
|
|
50
|
-
### Lint-staged
|
|
51
|
-
|
|
52
|
-
- configure linting for js, ts, jsx, tsx.
|
|
53
|
-
- configure formatting for md, css, json.
|
|
54
|
-
- Automatically uses the selected linter and formatter.
|
|
55
|
-
|
|
56
|
-
### Env Validation
|
|
57
|
-
|
|
58
|
-
- Supports Next.js, Nuxt, and Core variants.
|
|
59
|
-
- Choose validator: Zod, Valibot, or Arktype.
|
|
60
|
-
- Install presets for common platforms (Vercel, Railway, etc.).
|
|
61
|
-
- Generate split (`env/client.ts`, `env/server.ts`) or joined (`env.ts`) files.
|
|
29
|
+
1. **Git Check**: Ensures your working directory is clean (or offers to commit changes).
|
|
30
|
+
2. **Survey**: Asks you which tools you want to set up and collects your preferences.
|
|
31
|
+
3. **Summary**: Shows a summary of the actions to be taken.
|
|
32
|
+
4. **Execution**: Installs dependencies and creates configuration files tailored to your choices.
|
|
62
33
|
|
|
63
34
|
## License
|
|
64
35
|
|
|
65
|
-
MIT
|
|
36
|
+
MIT ยฉ [MayR Labs](https://mayrlabs.com)
|