create-nuxt-base 0.1.19 โ†’ 0.1.20

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 CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.1.20](https://github.com/lenneTech/nuxt-base-starter/compare/v0.1.19...v0.1.20) (2023-07-03)
6
+
7
+
8
+ ### Features
9
+
10
+ * Add package-lock and remove auto-start ([500a7ee](https://github.com/lenneTech/nuxt-base-starter/commit/500a7eeca81de331929d314e7dfebeb19fc0b0c4))
11
+
5
12
  ### [0.1.19](https://github.com/lenneTech/nuxt-base-starter/compare/v0.1.18...v0.1.19) (2023-07-02)
6
13
 
7
14
 
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Nuxt Starter
2
- This is a starter template to create a Nuxt 3 development environment including Tailwind, Pinia, VueUse, Nuxt Base, Eslint, Cypress with Cucumber, Unit Tests and Husky.
2
+ This is a starter template to create a Nuxt 3 development environment including Tailwind, Pinia, VueUse, Nuxt Base, Eslint, Cypress with Cucumber, Unit Tests.
3
3
 
4
4
  Just run the following command to create your Nuxt environment:
5
5
 
package/index.js CHANGED
@@ -22,11 +22,11 @@ async function create() {
22
22
  }
23
23
 
24
24
  const projectName = process.argv[2];
25
+ const autoStart = process.argv[3] === 'auto-start';
25
26
 
26
27
  if (!projectName) {
27
28
  console.error("Please provide a valid project name.");
28
29
  process.exit(-1);
29
- return;
30
30
  }
31
31
 
32
32
  const currentDir = process.cwd();
@@ -58,36 +58,29 @@ async function create() {
58
58
  const npmInstall = spawn("npm", ["install"], { stdio: "inherit" });
59
59
  await waitForSpawn(npmInstall);
60
60
 
61
- const preCommitHook = spawn("npx", [
62
- "npx",
63
- "husky",
64
- "add",
65
- ".husky/pre-commit",
66
- '"npm run lint"',
67
- ]);
68
- await waitForSpawn(preCommitHook);
69
-
70
- const gitAdd = childProcess.exec("git add .husky/pre-commit");
71
- waitForChildProcess(gitAdd);
61
+ console.log("Success! Your new project is ready. ๐ŸŽ‰");
72
62
 
73
- console.log("Building Project ...");
74
- const npmRunBuild = spawn("npm", ["run", "build"], { stdio: "inherit" });
75
- await waitForSpawn(npmRunBuild)
76
- .then(() => console.log("โœ… Project was successfully built"))
77
- .catch(() => console.log("โŒ Error while building the project"));
63
+ if (autoStart) {
64
+ console.log("Building Project ...");
65
+ const npmRunBuild = spawn("npm", ["run", "build"], { stdio: "inherit" });
66
+ await waitForSpawn(npmRunBuild)
67
+ .then(() => console.log("โœ… Project was successfully built"))
68
+ .catch(() => console.log("โŒ Error while building the project"));
69
+
70
+
71
+ console.log(`Created ${projectName} at ${projectDir} ๐Ÿ’พ`);
72
+ console.log(`Launching ${projectName} in: 3 ๐Ÿ’ฅ`);
73
+ await waitForMS(1000);
74
+ console.log(`Launching ${projectName} in: 2 ๐Ÿ”ฅ`);
75
+ await waitForMS(1000);
76
+ console.log(`Launching ${projectName} in: 1 ๐Ÿงจ`);
77
+ await waitForMS(1000);
78
+ console.log(`Launching ${projectName} ... ๐Ÿš€`);
79
+ await waitForMS(1000);
80
+ const npmRunDev = spawn("npm", ["run", "dev"], { stdio: "inherit" });
81
+ await waitForSpawn(npmRunDev);
82
+ }
78
83
 
79
- console.log("Success! Your new project is ready. ๐ŸŽ‰");
80
- console.log(`Created ${projectName} at ${projectDir} ๐Ÿ’พ`);
81
- console.log(`Launching ${projectName} in: 3 ๐Ÿ’ฅ`);
82
- await waitForMS(1000);
83
- console.log(`Launching ${projectName} in: 2 ๐Ÿ”ฅ`);
84
- await waitForMS(1000);
85
- console.log(`Launching ${projectName} in: 1 ๐Ÿงจ`);
86
- await waitForMS(1000);
87
- console.log(`Launching ${projectName} ... ๐Ÿš€`);
88
- await waitForMS(1000);
89
- const npmRunDev = spawn("npm", ["run", "dev"], { stdio: "inherit" });
90
- await waitForSpawn(npmRunDev);
91
84
  }
92
85
 
93
86
  function waitForSpawn(spawn) {