create-vue 3.0.0-beta.8 → 3.0.2

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/README.md CHANGED
@@ -7,5 +7,11 @@ An easy way to start a Vue project
7
7
  ## Usage
8
8
 
9
9
  ```sh
10
- npm init vue@next
10
+ npm init vue@3
11
+ ```
12
+
13
+ Or, if you need to support IE11, you can create a Vue 2 project with:
14
+
15
+ ```sh
16
+ npm init vue@2
11
17
  ```
package/outfile.cjs CHANGED
@@ -5529,7 +5529,7 @@ async function init() {
5529
5529
  },
5530
5530
  boolean: true
5531
5531
  });
5532
- const isFeatureFlagsUsed = typeof (argv.default || argv.ts || argv.jsx || argv.router || argv.vuex || argv.tests) === "boolean";
5532
+ const isFeatureFlagsUsed = typeof (argv.default || argv.ts || argv.jsx || argv.router || argv.pinia || argv.tests) === "boolean";
5533
5533
  let targetDir = argv._[0];
5534
5534
  const defaultProjectName = !targetDir ? "vue-project" : targetDir;
5535
5535
  const forceOverwrite = argv.force;
@@ -5592,9 +5592,9 @@ async function init() {
5592
5592
  inactive: "No"
5593
5593
  },
5594
5594
  {
5595
- name: "needsVuex",
5595
+ name: "needsPinia",
5596
5596
  type: () => isFeatureFlagsUsed ? null : "toggle",
5597
- message: "Add Vuex for state management?",
5597
+ message: "Add Pinia for state management?",
5598
5598
  initial: false,
5599
5599
  active: "Yes",
5600
5600
  inactive: "No"
@@ -5622,7 +5622,7 @@ async function init() {
5622
5622
  needsJsx = argv.jsx,
5623
5623
  needsTypeScript = argv.typescript,
5624
5624
  needsRouter = argv.router,
5625
- needsVuex = argv.vuex,
5625
+ needsPinia = argv.pinia,
5626
5626
  needsTests = argv.tests
5627
5627
  } = result;
5628
5628
  const root = import_path3.default.join(cwd, targetDir);
@@ -5647,8 +5647,8 @@ Scaffolding project in ${root}...`);
5647
5647
  if (needsRouter) {
5648
5648
  render("config/router");
5649
5649
  }
5650
- if (needsVuex) {
5651
- render("config/vuex");
5650
+ if (needsPinia) {
5651
+ render("config/pinia");
5652
5652
  }
5653
5653
  if (needsTests) {
5654
5654
  render("config/cypress");
@@ -5658,10 +5658,10 @@ Scaffolding project in ${root}...`);
5658
5658
  }
5659
5659
  const codeTemplate = (needsTypeScript ? "typescript-" : "") + (needsRouter ? "router" : "default");
5660
5660
  render(`code/${codeTemplate}`);
5661
- if (needsVuex && needsRouter) {
5662
- render("entry/vuex-and-router");
5663
- } else if (needsVuex) {
5664
- render("entry/vuex");
5661
+ if (needsPinia && needsRouter) {
5662
+ render("entry/router-and-pinia");
5663
+ } else if (needsPinia) {
5664
+ render("entry/pinia");
5665
5665
  } else if (needsRouter) {
5666
5666
  render("entry/router");
5667
5667
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-vue",
3
- "version": "3.0.0-beta.8",
3
+ "version": "3.0.2",
4
4
  "description": "An easy way to start a Vue project",
5
5
  "type": "module",
6
6
  "bin": {
@@ -13,15 +13,6 @@
13
13
  "engines": {
14
14
  "node": "^14.13.1 || >=16.0.0"
15
15
  },
16
- "scripts": {
17
- "prepare": "husky install",
18
- "format": "prettier --write .",
19
- "build": "esbuild --bundle index.js --format=cjs --platform=node --outfile=outfile.cjs",
20
- "snapshot": "node snapshot.js",
21
- "pretest": "run-s build snapshot",
22
- "test": "node test.js",
23
- "prepublishOnly": "run-s build snapshot"
24
- },
25
16
  "repository": {
26
17
  "type": "git",
27
18
  "url": "git+https://github.com/vuejs/create-vue.git"
@@ -40,12 +31,19 @@
40
31
  "lint-staged": "^12.1.2",
41
32
  "minimist": "^1.2.5",
42
33
  "npm-run-all": "^4.1.5",
43
- "prettier": "^2.4.1",
34
+ "prettier": "^2.5.1",
44
35
  "prompts": "^2.4.2"
45
36
  },
46
37
  "lint-staged": {
47
38
  "*.{js,ts,vue,json}": [
48
39
  "prettier --write"
49
40
  ]
41
+ },
42
+ "scripts": {
43
+ "format": "prettier --write .",
44
+ "build": "esbuild --bundle index.js --format=cjs --platform=node --outfile=outfile.cjs",
45
+ "snapshot": "node snapshot.js",
46
+ "pretest": "run-s build snapshot",
47
+ "test": "node test.js"
50
48
  }
51
- }
49
+ }
@@ -17,7 +17,7 @@ dist-ssr
17
17
  /cypress/screenshots/
18
18
 
19
19
  # Editor directories and files
20
- .vscode
20
+ .vscode/*
21
21
  !.vscode/extensions.json
22
22
  .idea
23
23
  *.suo
@@ -5,10 +5,10 @@
5
5
  "preview": "vite preview --port 5050"
6
6
  },
7
7
  "dependencies": {
8
- "vue": "^3.2.22"
8
+ "vue": "^3.2.26"
9
9
  },
10
10
  "devDependencies": {
11
- "@vitejs/plugin-vue": "^1.10.0",
12
- "vite": "^2.6.14"
11
+ "@vitejs/plugin-vue": "^2.0.0",
12
+ "vite": "^2.7.1"
13
13
  }
14
14
  }
@@ -37,7 +37,6 @@ h3 {
37
37
  @media (min-width: 1024px) {
38
38
  .greetings h1,
39
39
  .greetings h3 {
40
- display: block;
41
40
  text-align: left;
42
41
  }
43
42
  }
@@ -8,7 +8,7 @@
8
8
  "devDependencies": {
9
9
  "@cypress/vite-dev-server": "^2.2.1",
10
10
  "@cypress/vue": "^3.0.5",
11
- "cypress": "^8.7.0",
11
+ "cypress": "^9.1.1",
12
12
  "start-server-and-test": "^1.14.0"
13
13
  }
14
14
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "devDependencies": {
3
- "@vitejs/plugin-vue-jsx": "^1.3.0"
3
+ "@vitejs/plugin-vue-jsx": "^1.3.1"
4
4
  }
5
5
  }
@@ -0,0 +1,5 @@
1
+ {
2
+ "dependencies": {
3
+ "pinia": "^2.0.6"
4
+ }
5
+ }
@@ -0,0 +1,16 @@
1
+ import { defineStore } from 'pinia'
2
+
3
+ export const useCounterStore = defineStore({
4
+ id: 'counter',
5
+ state: () => ({
6
+ counter: 0
7
+ }),
8
+ getters: {
9
+ doubleCount: (state) => state.counter * 2
10
+ },
11
+ actions: {
12
+ increment() {
13
+ this.counter++
14
+ }
15
+ }
16
+ })
@@ -4,7 +4,8 @@
4
4
  "typecheck": "vue-tsc --noEmit"
5
5
  },
6
6
  "devDependencies": {
7
- "typescript": "~4.4.4",
8
- "vue-tsc": "^0.29.6"
7
+ "@types/node": "^16.11.12",
8
+ "typescript": "~4.5.3",
9
+ "vue-tsc": "^0.29.8"
9
10
  }
10
11
  }
@@ -1,9 +1,9 @@
1
1
  import { createApp } from 'vue'
2
+ import { createPinia } from 'pinia'
2
3
  import App from './App.vue'
3
- import store from './store'
4
4
 
5
5
  const app = createApp(App)
6
6
 
7
- app.use(store)
7
+ app.use(createPinia())
8
8
 
9
9
  app.mount('#app')
@@ -1,12 +1,12 @@
1
1
  import { createApp } from 'vue'
2
- import App from './App.vue'
2
+ import { createPinia } from 'pinia'
3
3
 
4
+ import App from './App.vue'
4
5
  import router from './router'
5
- import store from './store'
6
6
 
7
7
  const app = createApp(App)
8
8
 
9
+ app.use(createPinia())
9
10
  app.use(router)
10
- app.use(store)
11
11
 
12
12
  app.mount('#app')
@@ -1,9 +0,0 @@
1
- import { createApp } from 'vue'
2
- import App from './App.vue'
3
- import router from './router'
4
-
5
- const app = createApp(App)
6
-
7
- app.use(router)
8
-
9
- app.mount('#app')