@pauldvlp/vp-react-ts-shadcn 0.6.3 → 0.6.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 pauldvlp
3
+ Copyright (c) 2026 Paul Barahona
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -30,18 +30,18 @@ vp create @pauldvlp:vp-react-ts-shadcn -- \
30
30
 
31
31
  ## Options
32
32
 
33
- | Option | Type / values | Default | Notes |
34
- | --------------- | ---------------------------------------------------------- | -------------- | --------------------------------------------------------------------------------------- |
35
- | `--name` | string | `my-app` | Root project / package name. |
36
- | `--scope` | string | `@<name>` | npm scope for workspace packages → `@scope/website`, `@scope/ui`. Defaults to the project name prefixed with `@` (e.g. `--name acme` → `@acme`); falls back to `@app`. |
37
- | `--base` | `radix` \| `base` | `radix` | shadcn component library (radix-ui or @base-ui). Honored by `shadcn init --base`. |
38
- | `--preset` | style name or code | `b30557okNu` | A style (`nova`, `vega`, `maia`, `lyra`, `mira`, `luma`, `sera`, `rhea`) **or** a code from ui.shadcn.com. **Owns** color, fonts, radius, baseColor, menu styling. |
39
- | `--iconLibrary` | `lucide` \| `hugeicons` \| `radix` \| `tabler` | `hugeicons` | Icon library (persists; not part of the preset). |
40
- | `--cssVariables`| boolean | `true` | CSS variables for theming. |
41
- | `--rtl` | boolean | `false` | RTL support. |
42
- | `--pointer` | boolean | `false` | Pointer cursor on interactive elements. |
43
- | `--components` | comma list | `button,badge` | shadcn components to pre-install. `button` + `badge` are always included. |
44
- | `--install` | boolean | `true` | Run install + apply the shadcn theme after scaffolding. `false` = files only. |
33
+ | Option | Type / values | Default | Notes |
34
+ | ---------------- | ---------------------------------------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
35
+ | `--name` | string | `my-app` | Root project / package name. |
36
+ | `--scope` | string | `@<name>` | npm scope for workspace packages → `@scope/website`, `@scope/ui`. Defaults to the project name prefixed with `@` (e.g. `--name acme` → `@acme`); falls back to `@app`. |
37
+ | `--base` | `radix` \| `base` | `radix` | shadcn component library (radix-ui or @base-ui). Honored by `shadcn init --base`. |
38
+ | `--preset` | style name or code | `b30557okNu` | A style (`nova`, `vega`, `maia`, `lyra`, `mira`, `luma`, `sera`, `rhea`) **or** a code from ui.shadcn.com. **Owns** color, fonts, radius, baseColor, menu styling. |
39
+ | `--iconLibrary` | `lucide` \| `hugeicons` \| `radix` \| `tabler` | `hugeicons` | Icon library (persists; not part of the preset). |
40
+ | `--cssVariables` | boolean | `true` | CSS variables for theming. |
41
+ | `--rtl` | boolean | `false` | RTL support. |
42
+ | `--pointer` | boolean | `false` | Pointer cursor on interactive elements. |
43
+ | `--components` | comma list | `button,badge` | shadcn components to pre-install. `button` + `badge` are always included. |
44
+ | `--install` | boolean | `true` | Run install + apply the shadcn theme after scaffolding. `false` = files only. |
45
45
 
46
46
  ### What the preset controls vs. what you control
47
47
 
package/dist/index.js CHANGED
@@ -188,7 +188,10 @@ function resolveDefault(d, options, directory) {
188
188
  }
189
189
  async function promptForOption(d, def) {
190
190
  if (d.type === "boolean") {
191
- return prompts.confirm({ message: d.message, initialValue: def === void 0 ? false : Boolean(def) });
191
+ return prompts.confirm({
192
+ message: d.message,
193
+ initialValue: def === void 0 ? false : Boolean(def)
194
+ });
192
195
  }
193
196
  if (d.type === "select") {
194
197
  return prompts.select({
@@ -233,7 +236,11 @@ function initGit(dir) {
233
236
  } catch {
234
237
  identity = ["-c", "user.name=create", "-c", "user.email=create@users.noreply.github.com"];
235
238
  }
236
- execFileSync("git", [...identity, "commit", "-m", "feat: initialize project", "--no-gpg-sign"], { cwd: dir, stdio: "ignore" });
239
+ execFileSync(
240
+ "git",
241
+ [...identity, "commit", "-m", "feat: initialize project", "--no-gpg-sign"],
242
+ { cwd: dir, stdio: "ignore" }
243
+ );
237
244
  } catch {
238
245
  }
239
246
  }
@@ -249,7 +256,11 @@ async function runTemplateCLI(template) {
249
256
  let directory = dirArg;
250
257
  if (!directory) {
251
258
  if (interactive) {
252
- const answer = await prompts.text({ message: "Where should we create your project?", placeholder: "my-app", defaultValue: "my-app" });
259
+ const answer = await prompts.text({
260
+ message: "Where should we create your project?",
261
+ placeholder: "my-app",
262
+ defaultValue: "my-app"
263
+ });
253
264
  if (prompts.isCancel(answer)) {
254
265
  prompts.cancel("Cancelled.");
255
266
  return 2;
@@ -291,7 +302,11 @@ async function runTemplateCLI(template) {
291
302
  for (const step of [...creation.scripts].sort((a, b) => a.phase - b.phase)) {
292
303
  for (const [program, ...commandArgs] of step.commands) {
293
304
  if (!program) continue;
294
- execFileSync(program, commandArgs, { cwd: directory, stdio: "inherit" });
305
+ execFileSync(program, commandArgs, {
306
+ cwd: directory,
307
+ stdio: "inherit",
308
+ shell: process.platform === "win32"
309
+ });
295
310
  }
296
311
  }
297
312
  }
@@ -318,18 +333,69 @@ var template_default = defineTemplate({
318
333
  },
319
334
  options: [
320
335
  // Default the name to the target directory the user chose, so they don't retype it.
321
- { key: "name", type: "string", message: "Root project / package name", default: ({ directory }) => dirName(directory), validate: validateName },
336
+ {
337
+ key: "name",
338
+ type: "string",
339
+ message: "Root project / package name",
340
+ default: ({ directory }) => dirName(directory),
341
+ validate: validateName
342
+ },
322
343
  // Lazily default the package scope to `@<name>` (prefixing `@` unless the name already has one),
323
344
  // so it tracks the project name instead of a fixed value. Falls back to `@app` when no name is set.
324
- { key: "scope", type: "string", message: "npm scope for workspace packages, e.g. @acme (defaults to @<name>)", default: ({ options }) => options.name ? toScope(options.name) : "@app", validate: validateScope },
325
- { key: "base", type: "select", message: "shadcn component library base (radix-ui or @base-ui)", choices: ["radix", "base"], default: "radix" },
326
- { key: "preset", type: "string", message: "shadcn preset: a style name (nova, vega, maia, lyra, mira, luma, sera, rhea) or a code from ui.shadcn.com", default: DEFAULT_PRESET, validate: validatePreset },
327
- { key: "iconLibrary", type: "select", message: "Icon library", choices: ["lucide", "hugeicons", "radix", "tabler"], default: "hugeicons" },
328
- { key: "cssVariables", type: "boolean", message: "Use CSS variables for theming", default: true },
345
+ {
346
+ key: "scope",
347
+ type: "string",
348
+ message: "npm scope for workspace packages, e.g. @acme (defaults to @<name>)",
349
+ default: ({ options }) => options.name ? toScope(options.name) : "@app",
350
+ validate: validateScope
351
+ },
352
+ {
353
+ key: "base",
354
+ type: "select",
355
+ message: "shadcn component library base (radix-ui or @base-ui)",
356
+ choices: ["radix", "base"],
357
+ default: "radix"
358
+ },
359
+ {
360
+ key: "preset",
361
+ type: "string",
362
+ message: "shadcn preset: a style name (nova, vega, maia, lyra, mira, luma, sera, rhea) or a code from ui.shadcn.com",
363
+ default: DEFAULT_PRESET,
364
+ validate: validatePreset
365
+ },
366
+ {
367
+ key: "iconLibrary",
368
+ type: "select",
369
+ message: "Icon library",
370
+ choices: ["lucide", "hugeicons", "radix", "tabler"],
371
+ default: "hugeicons"
372
+ },
373
+ {
374
+ key: "cssVariables",
375
+ type: "boolean",
376
+ message: "Use CSS variables for theming",
377
+ default: true
378
+ },
329
379
  { key: "rtl", type: "boolean", message: "Enable RTL support", default: false },
330
- { key: "pointer", type: "boolean", message: "Use pointer cursor on interactive elements", default: false },
331
- { key: "components", type: "string", message: "Comma-separated shadcn components to pre-install, e.g. button,card,dialog", default: "button,badge", validate: validateComponents },
332
- { key: "install", type: "boolean", message: "Install deps and apply the shadcn theme after scaffolding", default: true }
380
+ {
381
+ key: "pointer",
382
+ type: "boolean",
383
+ message: "Use pointer cursor on interactive elements",
384
+ default: false
385
+ },
386
+ {
387
+ key: "components",
388
+ type: "string",
389
+ message: "Comma-separated shadcn components to pre-install, e.g. button,card,dialog",
390
+ default: "button,badge",
391
+ validate: validateComponents
392
+ },
393
+ {
394
+ key: "install",
395
+ type: "boolean",
396
+ message: "Install deps and apply the shadcn theme after scaffolding",
397
+ default: true
398
+ }
333
399
  ],
334
400
  async produce({ options }) {
335
401
  const scope = toScope(options.scope || options.name || "app");
@@ -337,8 +403,12 @@ var template_default = defineTemplate({
337
403
  TEMPLATE_DIR,
338
404
  (_rel, content) => content.split("@app").join(scope).split("__PROJECT_NAME__").join(options.name)
339
405
  );
340
- setPath(files, "packages/ui/components.json", `${JSON.stringify(uiComponentsJson({ ...options, scope }), null, 2)}
341
- `);
406
+ setPath(
407
+ files,
408
+ "packages/ui/components.json",
409
+ `${JSON.stringify(uiComponentsJson({ ...options, scope }), null, 2)}
410
+ `
411
+ );
342
412
  setPath(
343
413
  files,
344
414
  "apps/website/components.json",
@@ -354,7 +424,10 @@ var template_default = defineTemplate({
354
424
  const scripts = options.install ? [
355
425
  { commands: [["pnpm", "install", "--silent"]], phase: 0 },
356
426
  { commands: [["pnpm", "--filter", ui, "exec", "shadcn", "init", ...initArgs]], phase: 1 },
357
- { commands: [["pnpm", "--filter", ui, "exec", "shadcn", "add", ...adds, "-y"]], phase: 2 }
427
+ {
428
+ commands: [["pnpm", "--filter", ui, "exec", "shadcn", "add", ...adds, "-y"]],
429
+ phase: 2
430
+ }
358
431
  ] : [];
359
432
  return {
360
433
  files,
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@pauldvlp/vp-react-ts-shadcn",
3
- "version": "0.6.3",
3
+ "version": "0.6.5",
4
4
  "description": "Vite+ monorepo template: one frontend app (website) + a shared shadcn UI package, themeable via shadcn presets.",
5
- "author": "pauldvlp (https://github.com/pauldvlp/vp-templates)",
5
+ "author": "Paul Barahona <johanpaulbarahona@gmail.com> (https://github.com/pauldvlp/vp-templates)",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/pauldvlp/vp-templates",
8
8
  "repository": {
@@ -37,7 +37,8 @@
37
37
  },
38
38
  "scripts": {
39
39
  "build": "esbuild bin/index.ts --bundle --outfile=dist/index.js --format=esm --platform=node --target=node22 --packages=external",
40
- "dev": "node bin/index.ts"
40
+ "dev": "node bin/index.ts",
41
+ "typecheck": "tsc --noEmit"
41
42
  },
42
43
  "bin": {
43
44
  "vp-react-ts-shadcn": "./dist/index.js"
@@ -17,7 +17,7 @@
17
17
  "devEngines": {
18
18
  "packageManager": {
19
19
  "name": "pnpm",
20
- "version": "11.9.0",
20
+ "version": "11.17.0",
21
21
  "onFail": "warn"
22
22
  }
23
23
  },