create-nuxt-base 0.1.18 โ†’ 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,21 @@
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
+
12
+ ### [0.1.19](https://github.com/lenneTech/nuxt-base-starter/compare/v0.1.18...v0.1.19) (2023-07-02)
13
+
14
+
15
+ ### Features
16
+
17
+ * added eslint-config ([d0f9146](https://github.com/lenneTech/nuxt-base-starter/commit/d0f9146eba44a72c839be8996357a9f2a55e8737))
18
+ * updated eslint-config version ([2f1ef56](https://github.com/lenneTech/nuxt-base-starter/commit/2f1ef56b67eb4866908753f67e9b27b98a174543))
19
+
5
20
  ### [0.1.18](https://github.com/lenneTech/nuxt-base-starter/compare/v0.1.17...v0.1.18) (2023-06-26)
6
21
 
7
22
 
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) {
@@ -1,4 +1,3 @@
1
1
  {
2
- "extends": "@antfu",
3
- "plugins": ["vitest"]
4
- }
2
+ "extends": "@lenne.tech/vue"
3
+ }
@@ -1,5 +1,5 @@
1
1
  describe('template spec', () => {
2
2
  it('passes', () => {
3
- cy.visit('https://example.cypress.io')
4
- })
5
- })
3
+ cy.visit('https://example.cypress.io');
4
+ });
5
+ });
@@ -14,7 +14,7 @@
14
14
  // ***********************************************************
15
15
 
16
16
  // Import commands.js using ES2015 syntax:
17
- import './commands'
17
+ import './commands';
18
18
 
19
19
  // Alternatively you can use CommonJS syntax:
20
20
  // require('./commands')
@@ -1,12 +1,12 @@
1
- import { addCucumberPreprocessorPlugin } from '@badeball/cypress-cucumber-preprocessor'
2
- import * as webpack from '@cypress/webpack-preprocessor'
3
- import { defineConfig } from 'cypress'
1
+ import { addCucumberPreprocessorPlugin } from '@badeball/cypress-cucumber-preprocessor';
2
+ import * as webpack from '@cypress/webpack-preprocessor';
3
+ import { defineConfig } from 'cypress';
4
4
 
5
5
  async function setupNodeEvents(
6
6
  on: Cypress.PluginEvents,
7
7
  config: Cypress.PluginConfigOptions,
8
8
  ): Promise<Cypress.PluginConfigOptions> {
9
- await addCucumberPreprocessorPlugin(on, config)
9
+ await addCucumberPreprocessorPlugin(on, config);
10
10
 
11
11
  on(
12
12
  'file:preprocessor',
@@ -39,10 +39,10 @@ async function setupNodeEvents(
39
39
  },
40
40
  },
41
41
  }),
42
- )
42
+ );
43
43
 
44
44
  // Make sure to return the config object as it might have been modified by the plugin.
45
- return config
45
+ return config;
46
46
  }
47
47
 
48
48
  export default defineConfig({
@@ -51,4 +51,4 @@ export default defineConfig({
51
51
  supportFile: false,
52
52
  specPattern: ['cypress/e2e/**/*.cy.{js,ts}', 'cypress/integrations/**/*.feature'],
53
53
  },
54
- })
54
+ });
@@ -1,25 +1,25 @@
1
1
  // https://nuxt.com/docs/api/configuration/nuxt-config
2
2
  export default defineNuxtConfig({
3
- srcDir: "./src",
3
+ srcDir: './src',
4
4
  modules: [
5
- "@nuxtjs/tailwindcss",
6
- "@lenne.tech/nuxt-base",
7
- "@vueuse/nuxt",
8
- "@formkit/nuxt",
5
+ '@nuxtjs/tailwindcss',
6
+ '@lenne.tech/nuxt-base',
7
+ '@vueuse/nuxt',
8
+ '@formkit/nuxt',
9
9
  ],
10
10
  nuxtBase: {
11
- host: "http://localhost:3000/graphql",
12
- schema: "../api/schema.gql",
11
+ host: 'http://localhost:3000/graphql',
12
+ schema: '../api/schema.gql',
13
13
  watch: false,
14
14
  autoImport: true,
15
15
  apollo: {
16
- authType: "Bearer",
17
- authHeader: "Authorization",
18
- tokenStorage: "cookie",
16
+ authType: 'Bearer',
17
+ authHeader: 'Authorization',
18
+ tokenStorage: 'cookie',
19
19
  proxyCookies: true,
20
20
  },
21
21
  },
22
22
  imports: {
23
- dirs: ["./states", "./stores", "./forms"],
23
+ dirs: ['./states', './stores', './forms'],
24
24
  },
25
25
  });