vite-plus 0.1.4 → 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.
@@ -50,7 +50,7 @@ async function main() {
50
50
  const root = process.cwd();
51
51
  // --- Step 1: Hooks setup ---
52
52
  const hooksDir = dir ?? '.vite-hooks';
53
- const isFirstHooksRun = !existsSync(join(root, hooksDir, 'pre-commit'));
53
+ const isFirstHooksRun = !existsSync(join(root, hooksDir, '_', 'pre-commit'));
54
54
  let shouldSetupHooks = true;
55
55
  if (interactive && isFirstHooksRun && !dir) {
56
56
  // --hooks-dir implies agreement; only prompt when using default dir on first run
@@ -391,7 +391,7 @@ async function main() {
391
391
  const hooksOnly = args["hooks-only"];
392
392
  const interactive = defaultInteractive();
393
393
  const root = process.cwd();
394
- const isFirstHooksRun = !existsSync(join(root, dir ?? ".vite-hooks", "pre-commit"));
394
+ const isFirstHooksRun = !existsSync(join(root, dir ?? ".vite-hooks", "_", "pre-commit"));
395
395
  let shouldSetupHooks = true;
396
396
  if (interactive && isFirstHooksRun && !dir) shouldSetupHooks = await promptGitHooks({ interactive });
397
397
  if (shouldSetupHooks) {
@@ -3479,7 +3479,7 @@ async function executeMonorepoTemplate(workspaceInfo, templateInfo, interactive,
3479
3479
  workspaceInfo.monorepoScope = getScopeFromPackageName(templateInfo.packageName);
3480
3480
  const fullPath = path.join(workspaceInfo.rootDir, templateInfo.targetDir);
3481
3481
  let initGit = true;
3482
- if (interactive) {
3482
+ if (interactive && !options?.silent) {
3483
3483
  const selected = await confirm({
3484
3484
  message: `Initialize git repository:`,
3485
3485
  initialValue: true
@@ -3837,7 +3837,7 @@ function showCreateSummary(options) {
3837
3837
  }
3838
3838
  async function main() {
3839
3839
  const { templateName, options, templateArgs } = parseArgs();
3840
- const compactOutput = !options.verbose;
3840
+ let compactOutput = !options.verbose;
3841
3841
  if (options.help) {
3842
3842
  log$1(vitePlusHeader() + "\n");
3843
3843
  log$1(helpMessage);
@@ -3946,6 +3946,7 @@ Use \`vp create --list\` to list all available templates, or run \`vp create --h
3946
3946
  } else selectedTemplateName = template;
3947
3947
  }
3948
3948
  const isBuiltinTemplate = selectedTemplateName.startsWith("vite:");
3949
+ if (!isBuiltinTemplate) compactOutput = false;
3949
3950
  if (targetDir && !isBuiltinTemplate) cancelAndExit("The --directory option is only available for builtin templates", 1);
3950
3951
  if (selectedTemplateName === BuiltinTemplate.monorepo && isMonorepo) {
3951
3952
  log.info("You are already in a monorepo workspace.\nUse a different template or run this command outside the monorepo");
@@ -4035,7 +4036,7 @@ Use \`vp create --list\` to list all available templates, or run \`vp create --h
4035
4036
  editor: options.editor,
4036
4037
  onCancel: () => cancelAndExit()
4037
4038
  });
4038
- shouldSetupHooks = await promptGitHooks(options);
4039
+ if (!isMonorepo) shouldSetupHooks = await promptGitHooks(options);
4039
4040
  const createProgress = options.interactive && compactOutput ? spinner({ indicator: "timer" }) : void 0;
4040
4041
  let createProgressStarted = false;
4041
4042
  let createProgressMessage = "Scaffolding project";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plus",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "license": "MIT",
5
5
  "bin": {
6
6
  "oxfmt": "./bin/oxfmt",
@@ -301,8 +301,8 @@
301
301
  "oxlint": "^1.51.0",
302
302
  "oxlint-tsgolint": "^0.16.0",
303
303
  "picocolors": "^1.1.1",
304
- "@voidzero-dev/vite-plus-core": "0.1.4",
305
- "@voidzero-dev/vite-plus-test": "0.1.4"
304
+ "@voidzero-dev/vite-plus-core": "0.1.5",
305
+ "@voidzero-dev/vite-plus-test": "0.1.5"
306
306
  },
307
307
  "devDependencies": {
308
308
  "@napi-rs/cli": "^3.4.1",
@@ -323,9 +323,9 @@
323
323
  "tsdown": "^0.21.1",
324
324
  "validate-npm-package-name": "^7.0.2",
325
325
  "yaml": "^2.8.1",
326
- "vite": "npm:@voidzero-dev/vite-plus-core@0.1.4",
327
326
  "@voidzero-dev/vite-plus-prompts": "0.0.0",
328
- "rolldown": "1.0.0-rc.8"
327
+ "rolldown": "1.0.0-rc.8",
328
+ "vite": "npm:@voidzero-dev/vite-plus-core@0.1.5"
329
329
  },
330
330
  "napi": {
331
331
  "binaryName": "vite-plus",
@@ -343,12 +343,12 @@
343
343
  "node": "^20.19.0 || >=22.12.0"
344
344
  },
345
345
  "optionalDependencies": {
346
- "@voidzero-dev/vite-plus-darwin-arm64": "0.1.4",
347
- "@voidzero-dev/vite-plus-darwin-x64": "0.1.4",
348
- "@voidzero-dev/vite-plus-linux-arm64-gnu": "0.1.4",
349
- "@voidzero-dev/vite-plus-linux-x64-gnu": "0.1.4",
350
- "@voidzero-dev/vite-plus-win32-x64-msvc": "0.1.4",
351
- "@voidzero-dev/vite-plus-win32-arm64-msvc": "0.1.4"
346
+ "@voidzero-dev/vite-plus-darwin-arm64": "0.1.5",
347
+ "@voidzero-dev/vite-plus-darwin-x64": "0.1.5",
348
+ "@voidzero-dev/vite-plus-linux-arm64-gnu": "0.1.5",
349
+ "@voidzero-dev/vite-plus-linux-x64-gnu": "0.1.5",
350
+ "@voidzero-dev/vite-plus-win32-x64-msvc": "0.1.5",
351
+ "@voidzero-dev/vite-plus-win32-arm64-msvc": "0.1.5"
352
352
  },
353
353
  "scripts": {
354
354
  "build": "oxnode -C dev ./build.ts",