@foundrykit/cli 1.0.5 → 1.0.6
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 +6 -0
- package/README.md +37 -9
- package/dist/cli.js +446 -277
- package/dist/cli.js.map +1 -1
- package/dist/index.js +446 -277
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/commands/init.ts +581 -411
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -61,15 +61,40 @@ foundrykit init [options]
|
|
|
61
61
|
**Options:**
|
|
62
62
|
- `-f, --force` - Overwrite existing files
|
|
63
63
|
- `--skip-install` - Skip installing dependencies
|
|
64
|
+
- `--skip-prompts` - Use default paths without prompting for customization
|
|
64
65
|
|
|
65
66
|
**What it does:**
|
|
66
|
-
1. Validates that you're in a Next.js
|
|
67
|
-
2.
|
|
68
|
-
3.
|
|
69
|
-
4.
|
|
70
|
-
5.
|
|
71
|
-
6.
|
|
72
|
-
7.
|
|
67
|
+
1. Validates that you're in a React-based project (Next.js, Vite, Remix)
|
|
68
|
+
2. **Detects your project structure** and suggests smart default paths
|
|
69
|
+
3. **Prompts for custom paths** - you can customize where files and folders are created
|
|
70
|
+
4. Installs required dependencies (if not in a workspace)
|
|
71
|
+
5. Sets up Tailwind CSS v4 with FoundryKit styles
|
|
72
|
+
6. Creates component directories in your chosen locations
|
|
73
|
+
7. Creates utility files (`lib/utils.ts` or custom path)
|
|
74
|
+
8. Updates your layout/App file to import FoundryKit styles
|
|
75
|
+
9. Adds convenient scripts to package.json
|
|
76
|
+
|
|
77
|
+
**Path Customization:**
|
|
78
|
+
The init command now intelligently detects your project structure and offers to customize paths:
|
|
79
|
+
- Automatically detects if you use `src/` directory
|
|
80
|
+
- Finds existing `components/`, `lib/`, `styles/` directories
|
|
81
|
+
- Suggests appropriate defaults based on your framework (Next.js, Vite, Remix)
|
|
82
|
+
- Allows you to customize each path individually
|
|
83
|
+
|
|
84
|
+
Example prompts:
|
|
85
|
+
```
|
|
86
|
+
📂 Configure installation paths:
|
|
87
|
+
Press enter to use the default value shown in parentheses
|
|
88
|
+
|
|
89
|
+
? Utils file path: (./src/lib/utils.ts)
|
|
90
|
+
? Components directory: (./src/components/components)
|
|
91
|
+
? Primitives directory: (./src/components/primitives)
|
|
92
|
+
? Blocks directory: (./src/components/blocks)
|
|
93
|
+
? Hooks directory: (./src/hooks)
|
|
94
|
+
? Animations directory: (./src/components/animations)
|
|
95
|
+
? Global styles file: (./src/app/globals.css)
|
|
96
|
+
? Lib directory: (./src/lib)
|
|
97
|
+
```
|
|
73
98
|
|
|
74
99
|
### `list`
|
|
75
100
|
|
|
@@ -222,9 +247,12 @@ your-nextjs-app/
|
|
|
222
247
|
## Requirements
|
|
223
248
|
|
|
224
249
|
- Node.js 18.0.0 or higher
|
|
225
|
-
- Next.js 14.0.0 or higher
|
|
226
|
-
- Tailwind CSS v4
|
|
227
250
|
- React 18 or 19
|
|
251
|
+
- One of the following frameworks:
|
|
252
|
+
- Next.js 14.0.0 or higher
|
|
253
|
+
- Vite 5.0.0 or higher
|
|
254
|
+
- Remix 2.0.0 or higher
|
|
255
|
+
- Tailwind CSS v4
|
|
228
256
|
|
|
229
257
|
## Troubleshooting
|
|
230
258
|
|