create-bunli 0.8.0 → 0.8.2
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/README.md +18 -6
- package/dist/cli.js +589 -560
- package/dist/create-project.d.ts +4 -4
- package/dist/create-project.d.ts.map +1 -1
- package/dist/create.d.ts +3 -3
- package/dist/create.d.ts.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +518 -512
- package/dist/steps.d.ts +5 -5
- package/dist/steps.d.ts.map +1 -1
- package/dist/template-engine.d.ts +2 -2
- package/dist/template-engine.d.ts.map +1 -1
- package/dist/templates/advanced/README.md +8 -4
- package/dist/templates/advanced/bunli.config.ts +19 -19
- package/dist/templates/advanced/package.json +8 -4
- package/dist/templates/advanced/src/commands/config.ts +129 -119
- package/dist/templates/advanced/src/commands/init.ts +53 -60
- package/dist/templates/advanced/src/commands/serve.ts +77 -83
- package/dist/templates/advanced/src/commands/validate.ts +58 -66
- package/dist/templates/advanced/src/index.ts +30 -29
- package/dist/templates/advanced/src/utils/config.ts +48 -47
- package/dist/templates/advanced/src/utils/constants.ts +6 -6
- package/dist/templates/advanced/src/utils/glob.ts +29 -28
- package/dist/templates/advanced/src/utils/validator.ts +60 -61
- package/dist/templates/advanced/template.json +2 -6
- package/dist/templates/advanced/tsconfig.json +1 -1
- package/dist/templates/basic/README.md +1 -1
- package/dist/templates/basic/bunli.config.ts +17 -17
- package/dist/templates/basic/package.json +3 -3
- package/dist/templates/basic/src/commands/hello.ts +20 -26
- package/dist/templates/basic/src/index.ts +9 -8
- package/dist/templates/basic/template.json +2 -6
- package/dist/templates/basic/tsconfig.json +1 -1
- package/dist/templates/monorepo/README.md +1 -1
- package/dist/templates/monorepo/bunli.config.ts +21 -21
- package/dist/templates/monorepo/package.json +3 -3
- package/dist/templates/monorepo/packages/cli/package.json +9 -5
- package/dist/templates/monorepo/packages/cli/src/index.ts +13 -13
- package/dist/templates/monorepo/packages/cli/tsconfig.json +2 -5
- package/dist/templates/monorepo/packages/core/package.json +4 -4
- package/dist/templates/monorepo/packages/core/scripts/build.ts +10 -10
- package/dist/templates/monorepo/packages/core/src/commands/analyze.ts +58 -57
- package/dist/templates/monorepo/packages/core/src/commands/process.ts +39 -47
- package/dist/templates/monorepo/packages/core/src/index.ts +3 -3
- package/dist/templates/monorepo/packages/core/src/types.ts +15 -15
- package/dist/templates/monorepo/packages/core/tsconfig.json +2 -4
- package/dist/templates/monorepo/packages/utils/package.json +4 -4
- package/dist/templates/monorepo/packages/utils/scripts/build.ts +10 -10
- package/dist/templates/monorepo/packages/utils/src/format.ts +19 -19
- package/dist/templates/monorepo/packages/utils/src/index.ts +3 -3
- package/dist/templates/monorepo/packages/utils/src/json.ts +4 -4
- package/dist/templates/monorepo/packages/utils/src/logger.ts +9 -9
- package/dist/templates/monorepo/packages/utils/tsconfig.json +1 -1
- package/dist/templates/monorepo/template.json +2 -6
- package/dist/templates/monorepo/tsconfig.json +1 -1
- package/dist/templates/monorepo/turbo.json +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +28 -28
- package/templates/advanced/README.md +8 -4
- package/templates/advanced/bunli.config.ts +19 -19
- package/templates/advanced/package.json +8 -4
- package/templates/advanced/src/commands/config.ts +129 -119
- package/templates/advanced/src/commands/init.ts +53 -60
- package/templates/advanced/src/commands/serve.ts +77 -83
- package/templates/advanced/src/commands/validate.ts +58 -66
- package/templates/advanced/src/index.ts +30 -29
- package/templates/advanced/src/utils/config.ts +48 -47
- package/templates/advanced/src/utils/constants.ts +6 -6
- package/templates/advanced/src/utils/glob.ts +29 -28
- package/templates/advanced/src/utils/validator.ts +60 -61
- package/templates/advanced/template.json +2 -6
- package/templates/advanced/tsconfig.json +1 -1
- package/templates/basic/README.md +1 -1
- package/templates/basic/bunli.config.ts +17 -17
- package/templates/basic/package.json +3 -3
- package/templates/basic/src/commands/hello.ts +20 -26
- package/templates/basic/src/index.ts +9 -8
- package/templates/basic/template.json +2 -6
- package/templates/basic/tsconfig.json +1 -1
- package/templates/monorepo/README.md +1 -1
- package/templates/monorepo/bunli.config.ts +21 -21
- package/templates/monorepo/package.json +3 -3
- package/templates/monorepo/packages/cli/package.json +9 -5
- package/templates/monorepo/packages/cli/src/index.ts +13 -13
- package/templates/monorepo/packages/cli/tsconfig.json +2 -5
- package/templates/monorepo/packages/core/package.json +4 -4
- package/templates/monorepo/packages/core/scripts/build.ts +10 -10
- package/templates/monorepo/packages/core/src/commands/analyze.ts +58 -57
- package/templates/monorepo/packages/core/src/commands/process.ts +39 -47
- package/templates/monorepo/packages/core/src/index.ts +3 -3
- package/templates/monorepo/packages/core/src/types.ts +15 -15
- package/templates/monorepo/packages/core/tsconfig.json +2 -4
- package/templates/monorepo/packages/utils/package.json +4 -4
- package/templates/monorepo/packages/utils/scripts/build.ts +10 -10
- package/templates/monorepo/packages/utils/src/format.ts +19 -19
- package/templates/monorepo/packages/utils/src/index.ts +3 -3
- package/templates/monorepo/packages/utils/src/json.ts +4 -4
- package/templates/monorepo/packages/utils/src/logger.ts +9 -9
- package/templates/monorepo/packages/utils/tsconfig.json +1 -1
- package/templates/monorepo/template.json +2 -6
- package/templates/monorepo/tsconfig.json +1 -1
- package/templates/monorepo/turbo.json +1 -1
package/README.md
CHANGED
|
@@ -101,12 +101,14 @@ bunx create-bunli my-cli --template pvtnbr/bunli-starter
|
|
|
101
101
|
Perfect for simple CLI tools with a single command.
|
|
102
102
|
|
|
103
103
|
**Features:**
|
|
104
|
+
|
|
104
105
|
- Single command setup
|
|
105
106
|
- TypeScript configuration
|
|
106
107
|
- Test setup with @bunli/test
|
|
107
108
|
- Build script using bunli
|
|
108
109
|
|
|
109
110
|
**Structure:**
|
|
111
|
+
|
|
110
112
|
```
|
|
111
113
|
my-cli/
|
|
112
114
|
├── src/
|
|
@@ -125,6 +127,7 @@ my-cli/
|
|
|
125
127
|
For complex CLIs with multiple commands and features.
|
|
126
128
|
|
|
127
129
|
**Features:**
|
|
130
|
+
|
|
128
131
|
- Multiple commands with subcommands
|
|
129
132
|
- Configuration management
|
|
130
133
|
- File validation system
|
|
@@ -132,12 +135,14 @@ For complex CLIs with multiple commands and features.
|
|
|
132
135
|
- Advanced command examples
|
|
133
136
|
|
|
134
137
|
**Commands included:**
|
|
138
|
+
|
|
135
139
|
- `init` - Initialize configuration
|
|
136
140
|
- `validate` - Validate files with rules
|
|
137
141
|
- `serve` - Start development server
|
|
138
142
|
- `config` - Manage configuration
|
|
139
143
|
|
|
140
144
|
**Structure:**
|
|
145
|
+
|
|
141
146
|
```
|
|
142
147
|
my-cli/
|
|
143
148
|
├── src/
|
|
@@ -162,6 +167,7 @@ my-cli/
|
|
|
162
167
|
For large projects with multiple packages.
|
|
163
168
|
|
|
164
169
|
**Features:**
|
|
170
|
+
|
|
165
171
|
- Turborepo configuration
|
|
166
172
|
- Multiple packages setup
|
|
167
173
|
- Shared dependencies
|
|
@@ -169,6 +175,7 @@ For large projects with multiple packages.
|
|
|
169
175
|
- Parallel builds
|
|
170
176
|
|
|
171
177
|
**Structure:**
|
|
178
|
+
|
|
172
179
|
```
|
|
173
180
|
my-cli/
|
|
174
181
|
├── packages/
|
|
@@ -211,6 +218,7 @@ Templates can include a `template.json` manifest:
|
|
|
211
218
|
All templates include type generation configuration for enhanced developer experience:
|
|
212
219
|
|
|
213
220
|
This provides:
|
|
221
|
+
|
|
214
222
|
- **Autocomplete** for command names and options
|
|
215
223
|
- **Type safety** at compile time
|
|
216
224
|
- **IntelliSense** for command metadata
|
|
@@ -229,19 +237,20 @@ Use these variables in your template files:
|
|
|
229
237
|
- `{{year}}` - Current year
|
|
230
238
|
|
|
231
239
|
Variables can be used in file contents and filenames:
|
|
240
|
+
|
|
232
241
|
- `__projectName__.config.js` → `my-app.config.js`
|
|
233
242
|
|
|
234
243
|
## Programmatic Usage
|
|
235
244
|
|
|
236
245
|
```typescript
|
|
237
|
-
import { createProject } from
|
|
246
|
+
import { createProject } from "create-bunli";
|
|
238
247
|
|
|
239
248
|
await createProject({
|
|
240
|
-
name:
|
|
241
|
-
template:
|
|
249
|
+
name: "my-cli",
|
|
250
|
+
template: "advanced",
|
|
242
251
|
install: true,
|
|
243
|
-
git: true
|
|
244
|
-
})
|
|
252
|
+
git: true,
|
|
253
|
+
});
|
|
245
254
|
```
|
|
246
255
|
|
|
247
256
|
## Development
|
|
@@ -269,6 +278,7 @@ bun run build
|
|
|
269
278
|
### Template not found
|
|
270
279
|
|
|
271
280
|
If you get a "template not found" error, ensure:
|
|
281
|
+
|
|
272
282
|
- The template name is correct
|
|
273
283
|
- For GitHub templates, the repository exists and is public
|
|
274
284
|
- You have internet connection (for external templates)
|
|
@@ -276,6 +286,7 @@ If you get a "template not found" error, ensure:
|
|
|
276
286
|
### Installation fails
|
|
277
287
|
|
|
278
288
|
If dependency installation fails:
|
|
289
|
+
|
|
279
290
|
- Check your internet connection
|
|
280
291
|
- Ensure Bun is installed correctly
|
|
281
292
|
- Try running with `--no-install` and install manually with `bun install`
|
|
@@ -283,6 +294,7 @@ If dependency installation fails:
|
|
|
283
294
|
### Permission errors
|
|
284
295
|
|
|
285
296
|
If you get permission errors:
|
|
297
|
+
|
|
286
298
|
- Ensure you have write access to the target directory
|
|
287
299
|
- Try running in a different directory
|
|
288
300
|
- Check disk space availability
|
|
@@ -301,4 +313,4 @@ Contributions are welcome! Please read our [Contributing Guide](../../CONTRIBUTI
|
|
|
301
313
|
|
|
302
314
|
## License
|
|
303
315
|
|
|
304
|
-
MIT © [Arya Labs, Inc.](../../LICENSE)
|
|
316
|
+
MIT © [Arya Labs, Inc.](../../LICENSE)
|