@libria/scaffold 0.3.6 → 0.3.7

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.
@@ -1 +1 @@
1
- 118d651e61570cc85596e855535faf1ab6abebdee7f89daa278753ec48c7f6a1
1
+ 14624322df52dd5c41679e44f6151e38e2318fe584a01e6154d03738012bb764
package/README.md CHANGED
@@ -13,7 +13,8 @@ Forge your next project with lightning-fast scaffolding. A pluggable CLI that tr
13
13
  - **NPM Package Support**: Load templates from npm packages
14
14
  - **Dry Run Mode**: Preview what will be generated before committing
15
15
  - **Force Overwrite**: Safely regenerate existing projects
16
- - **Template Plugins**: Angular, NestJS, TypeScript libraries, and workspaces
16
+ - **Global + Local Config**: Global `~/.lbscaffold.json` defaults with local per-key overrides
17
+ - **Template Plugins**: Angular, NestJS, Next.js, TypeScript libraries, and workspaces
17
18
 
18
19
  ## Installation
19
20
 
@@ -103,7 +104,7 @@ A modern TypeScript library template with:
103
104
 
104
105
  A complete Angular application template using the official Angular CLI. Supports:
105
106
 
106
- - Angular versions: Latest, 20, 19, 18, 17, 16
107
+ - Angular versions: Latest, 21, 20, 19, 18, 17, 16
107
108
  - Stylesheet formats: SCSS, CSS, Sass, Less
108
109
  - Optional routing module
109
110
  - Optional Server-Side Rendering (SSR)
@@ -144,43 +145,81 @@ lb-scaffold new nestjs my-nest-api
144
145
  - Skip git initialization?
145
146
  - Skip package installation?
146
147
 
148
+ ### nextjs
149
+
150
+ A Next.js application template using the official `create-next-app`. Supports:
151
+
152
+ - Tailwind CSS (enabled by default)
153
+ - TypeScript or JavaScript
154
+ - App Router, API-only, or empty project types
155
+ - Turbopack or Webpack bundler
156
+ - ESLint, Biome, or no linter
157
+ - Package manager choice: npm, Yarn, pnpm, or Bun
158
+
159
+ ```bash
160
+ lb-scaffold new nextjs my-next-app
161
+ ```
162
+
163
+ **Interactive prompts:**
164
+ - Next.js version
165
+ - Language (TypeScript/JavaScript)
166
+ - Enable Tailwind CSS?
167
+ - Bundler (Turbopack/Webpack)
168
+ - Project type (app/api/empty)
169
+
147
170
  ### ts-workspace
148
171
 
149
- A TypeScript workspace (monorepo) template using pnpm workspaces. Creates a monorepo with multiple project types:
172
+ A TypeScript workspace (monorepo) template using npm workspaces and TypeScript project references. Provides two subcommands:
173
+
174
+ - **`init`** — Create a new workspace with shared tsconfig, package.json workspaces, and git setup
175
+ - **`add`** — Add projects into an existing workspace using other templates (ts-lib, angular, nestjs, nextjs)
150
176
 
151
- - TypeScript libraries (ts-lib)
152
- - Angular applications
153
- - NestJS backends
154
- - Shared packages
155
- - pnpm workspace configuration
156
- - Turbo or Nx for monorepo tooling (optional)
177
+ Automatically manages workspace `package.json` entries, TypeScript project references, and tsconfig inheritance.
157
178
 
158
179
  ```bash
180
+ # Create a new workspace
159
181
  lb-scaffold new ts-workspace my-monorepo
182
+
183
+ # Add a project into the workspace
184
+ lb-scaffold new ts-workspace my-lib --workspace ./my-monorepo --template ts-lib
160
185
  ```
161
186
 
162
- **Interactive prompts:**
163
- - Project types to include
164
- - Monorepo tool (Turbo, Nx, or none)
165
- - Skip git initialization?
166
- - Skip package installation?
187
+ **Interactive prompts (init):**
188
+ - Package manager (npm, Yarn, pnpm)
189
+ - Initialize git repository?
190
+
191
+ **Interactive prompts (add):**
192
+ - Workspace root path
193
+ - Template to use
194
+ - Base path for the new project
167
195
 
168
196
  ## Configuration
169
197
 
170
198
  The scaffold CLI supports a configuration file (`.lbscaffold.json`) that allows you to register custom plugin directories and npm packages. This enables you to use your own templates alongside the built-in ones.
171
199
 
172
- ### Config File Location
200
+ ### Config File Locations
201
+
202
+ The CLI supports two config file locations:
173
203
 
174
- The CLI searches for `.lbscaffold.json` starting from the current directory and walking up the directory tree. This allows you to have project-specific or workspace-level configurations.
204
+ - **Global**: `~/.lbscaffold.json` provides machine-wide defaults
205
+ - **Local**: `.lbscaffold.json` found by searching up from the current directory
206
+
207
+ When both exist, local keys override global keys on a per-key basis. For example, if the local config defines `plugins`, it fully replaces the global `plugins`; keys not present locally fall through to the global config.
175
208
 
176
209
  ### Config Commands
177
210
 
178
- Initialize a new config file:
211
+ Initialize a new config file in the current directory:
179
212
 
180
213
  ```bash
181
214
  lb-scaffold config init
182
215
  ```
183
216
 
217
+ Initialize the global config file:
218
+
219
+ ```bash
220
+ lb-scaffold config init -g
221
+ ```
222
+
184
223
  This creates a `.lbscaffold.json` file with a default plugin path:
185
224
 
186
225
  ```json
@@ -194,6 +233,9 @@ Add a custom plugin directory:
194
233
 
195
234
  ```bash
196
235
  lb-scaffold config add ./my-templates/**
236
+
237
+ # Add to global config
238
+ lb-scaffold config add ./my-templates/** -g
197
239
  ```
198
240
 
199
241
  Remove a plugin directory:
@@ -202,18 +244,26 @@ Remove a plugin directory:
202
244
  lb-scaffold config remove ./my-templates/**
203
245
  ```
204
246
 
205
- List all configured plugin patterns:
247
+ List all configured plugin patterns (shows merged config with source indicators):
206
248
 
207
249
  ```bash
208
250
  lb-scaffold config list
251
+
252
+ # Show only global config
253
+ lb-scaffold config list -g
209
254
  ```
210
255
 
211
256
  Show the full config file:
212
257
 
213
258
  ```bash
214
259
  lb-scaffold config show
260
+
261
+ # Show only global config
262
+ lb-scaffold config show -g
215
263
  ```
216
264
 
265
+ All config subcommands accept `-g` / `--global` to target the global config (`~/.lbscaffold.json`) instead of the local one.
266
+
217
267
  ### Config File Format
218
268
 
219
269
  The `.lbscaffold.json` config file is a JSON file with the following structure:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@libria/scaffold",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "description": "A pluggable CLI that transforms blank directories into production-ready codebases in seconds",
5
5
  "main": "dist/cli/index.cjs",
6
6
  "module": "dist/cli/index.mjs",
@@ -36,17 +36,17 @@
36
36
  "homepage": "https://github.com/LibriaForge/scaffold#readme",
37
37
  "dependencies": {
38
38
  "@libria/plugin-loader": "^2.1.0",
39
- "@libria/scaffold-core": "^0.3.6",
39
+ "@libria/scaffold-core": "^0.3.7",
40
40
  "commander": "^14.0.3",
41
41
  "fast-glob": "^3.3.3",
42
42
  "fs-extra": "^11.3.3",
43
43
  "interactive-commander": "^0.6.0"
44
44
  },
45
45
  "optionalDependencies": {
46
- "@libria/scaffold-plugin-angular": "^0.0.5",
47
- "@libria/scaffold-plugin-nestjs": "^0.0.4",
48
- "@libria/scaffold-plugin-nextjs": "^0.0.2",
49
- "@libria/scaffold-plugin-ts-lib": "^0.0.6",
50
- "@libria/scaffold-plugin-ts-workspace": "^0.0.5"
46
+ "@libria/scaffold-plugin-angular": "^0.0.6",
47
+ "@libria/scaffold-plugin-nestjs": "^0.0.5",
48
+ "@libria/scaffold-plugin-nextjs": "^0.0.3",
49
+ "@libria/scaffold-plugin-ts-lib": "^0.0.7",
50
+ "@libria/scaffold-plugin-ts-workspace": "^0.0.6"
51
51
  }
52
52
  }