create-vue 2.0.6 → 2.1.0-beta

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,10 @@
1
+ # create-vue core license
2
+
3
+ create-vue is released under the MIT license:
4
+
1
5
  MIT License
2
6
 
3
- Copyright (c) 2021 vuejs
7
+ Copyright (c) 2021-present vuejs
4
8
 
5
9
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
10
  of this software and associated documentation files (the "Software"), to deal
@@ -19,3 +23,151 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
23
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
24
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
25
  SOFTWARE.
26
+
27
+ ## Licenses of bundled dependencies
28
+
29
+ The published create-vue artifact additionally contains code with the following licenses:
30
+ MIT
31
+
32
+ ## Bundled dependencies
33
+
34
+ ## kleur
35
+
36
+ License: MIT
37
+ By: Luke Edwards
38
+ Repository: git+https://github.com/lukeed/kleur.git
39
+
40
+ > The MIT License (MIT)
41
+ >
42
+ > Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
43
+ >
44
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
45
+ > of this software and associated documentation files (the "Software"), to deal
46
+ > in the Software without restriction, including without limitation the rights
47
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
48
+ > copies of the Software, and to permit persons to whom the Software is
49
+ > furnished to do so, subject to the following conditions:
50
+ >
51
+ > The above copyright notice and this permission notice shall be included in
52
+ > all copies or substantial portions of the Software.
53
+ >
54
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
55
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
56
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
57
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
58
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
59
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
60
+ > THE SOFTWARE.
61
+ >
62
+
63
+ ## kolorist
64
+
65
+ License: MIT
66
+ By: Marvin Hagemeister
67
+ Repository: git+https://github.com/marvinhagemeister/kolorist.git
68
+
69
+ > The MIT License (MIT)
70
+ >
71
+ > Copyright (c) 2020-present Marvin Hagemeister
72
+ >
73
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
74
+ > of this software and associated documentation files (the "Software"), to deal
75
+ > in the Software without restriction, including without limitation the rights
76
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
77
+ > copies of the Software, and to permit persons to whom the Software is
78
+ > furnished to do so, subject to the following conditions:
79
+ >
80
+ > The above copyright notice and this permission notice shall be included in all
81
+ > copies or substantial portions of the Software.
82
+ >
83
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
84
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
85
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
86
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
87
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
88
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
89
+ > SOFTWARE.
90
+
91
+ ## minimist
92
+
93
+ License: MIT
94
+ By: James Halliday
95
+ Repository: git://github.com/substack/minimist.git
96
+
97
+ > This software is released under the MIT license:
98
+ >
99
+ > Permission is hereby granted, free of charge, to any person obtaining a copy of
100
+ > this software and associated documentation files (the "Software"), to deal in
101
+ > the Software without restriction, including without limitation the rights to
102
+ > use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
103
+ > the Software, and to permit persons to whom the Software is furnished to do so,
104
+ > subject to the following conditions:
105
+ >
106
+ > The above copyright notice and this permission notice shall be included in all
107
+ > copies or substantial portions of the Software.
108
+ >
109
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
110
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
111
+ > FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
112
+ > COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
113
+ > IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
114
+ > CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
115
+ >
116
+
117
+ ## prompts
118
+
119
+ License: MIT
120
+ By: Terkel Gjervig
121
+ Repository: git+https://github.com/terkelg/prompts.git
122
+
123
+ > MIT License
124
+ >
125
+ > Copyright (c) 2018 Terkel Gjervig Nielsen
126
+ >
127
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
128
+ > of this software and associated documentation files (the "Software"), to deal
129
+ > in the Software without restriction, including without limitation the rights
130
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
131
+ > copies of the Software, and to permit persons to whom the Software is
132
+ > furnished to do so, subject to the following conditions:
133
+ >
134
+ > The above copyright notice and this permission notice shall be included in all
135
+ > copies or substantial portions of the Software.
136
+ >
137
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
138
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
139
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
140
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
141
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
142
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
143
+ > SOFTWARE.
144
+ >
145
+
146
+ ## sisteransi
147
+
148
+ License: MIT
149
+ By: Terkel Gjervig
150
+ Repository: git+https://github.com/terkelg/sisteransi.git
151
+
152
+ > MIT License
153
+ >
154
+ > Copyright (c) 2018 Terkel Gjervig Nielsen
155
+ >
156
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
157
+ > of this software and associated documentation files (the "Software"), to deal
158
+ > in the Software without restriction, including without limitation the rights
159
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
160
+ > copies of the Software, and to permit persons to whom the Software is
161
+ > furnished to do so, subject to the following conditions:
162
+ >
163
+ > The above copyright notice and this permission notice shall be included in all
164
+ > copies or substantial portions of the Software.
165
+ >
166
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
167
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
168
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
169
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
170
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
171
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
172
+ > SOFTWARE.
173
+ >
package/outfile.cjs CHANGED
@@ -1,29 +1,27 @@
1
1
  #!/usr/bin/env node
2
+ /*! create-vue v2.1.0-beta | MIT */
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
7
  var __getProtoOf = Object.getPrototypeOf;
7
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
9
9
  var __commonJS = (cb, mod) => function __require() {
10
- return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
11
11
  };
12
- var __reExport = (target, module2, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && key !== "default")
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
17
  }
18
- return target;
19
- };
20
- var __toModule = (module2) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
18
+ return to;
22
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
23
21
 
24
- // node_modules/.pnpm/minimist@1.2.5/node_modules/minimist/index.js
22
+ // node_modules/.pnpm/minimist@1.2.6/node_modules/minimist/index.js
25
23
  var require_minimist = __commonJS({
26
- "node_modules/.pnpm/minimist@1.2.5/node_modules/minimist/index.js"(exports, module2) {
24
+ "node_modules/.pnpm/minimist@1.2.6/node_modules/minimist/index.js"(exports, module2) {
27
25
  module2.exports = function(args, opts) {
28
26
  if (!opts)
29
27
  opts = {};
@@ -81,7 +79,7 @@ var require_minimist = __commonJS({
81
79
  var o = obj;
82
80
  for (var i2 = 0; i2 < keys.length - 1; i2++) {
83
81
  var key2 = keys[i2];
84
- if (key2 === "__proto__")
82
+ if (isConstructorOrProto(o, key2))
85
83
  return;
86
84
  if (o[key2] === void 0)
87
85
  o[key2] = {};
@@ -92,7 +90,7 @@ var require_minimist = __commonJS({
92
90
  o = o[key2];
93
91
  }
94
92
  var key2 = keys[keys.length - 1];
95
- if (key2 === "__proto__")
93
+ if (isConstructorOrProto(o, key2))
96
94
  return;
97
95
  if (o === Object.prototype || o === Number.prototype || o === String.prototype)
98
96
  o = {};
@@ -220,6 +218,9 @@ var require_minimist = __commonJS({
220
218
  return true;
221
219
  return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
222
220
  }
221
+ function isConstructorOrProto(obj, key) {
222
+ return key === "constructor" && typeof obj[key] === "function" || key === "__proto__";
223
+ }
223
224
  }
224
225
  });
225
226
 
@@ -301,8 +302,8 @@ var require_kleur = __commonJS({
301
302
  }
302
303
  function init2(open, close) {
303
304
  let blk = {
304
- open: `[${open}m`,
305
- close: `[${close}m`,
305
+ open: `\x1B[${open}m`,
306
+ close: `\x1B[${close}m`,
306
307
  rgx: new RegExp(`\\x1b\\[${close}m`, "g")
307
308
  };
308
309
  return function(txt) {
@@ -393,7 +394,7 @@ var require_strip = __commonJS({
393
394
  var require_src = __commonJS({
394
395
  "node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports, module2) {
395
396
  "use strict";
396
- var ESC = "";
397
+ var ESC = "\x1B";
397
398
  var CSI = `${ESC}[`;
398
399
  var beep = "\x07";
399
400
  var cursor = {
@@ -5255,10 +5256,10 @@ var require_prompts3 = __commonJS({
5255
5256
  });
5256
5257
 
5257
5258
  // index.js
5258
- var import_fs4 = __toModule(require("fs"));
5259
- var import_path3 = __toModule(require("path"));
5260
- var import_minimist = __toModule(require_minimist());
5261
- var import_prompts = __toModule(require_prompts3());
5259
+ var import_fs3 = __toESM(require("fs"), 1);
5260
+ var import_path3 = __toESM(require("path"), 1);
5261
+ var import_minimist = __toESM(require_minimist(), 1);
5262
+ var import_prompts = __toESM(require_prompts3(), 1);
5262
5263
 
5263
5264
  // node_modules/.pnpm/kolorist@1.5.1/node_modules/kolorist/dist/esm/index.mjs
5264
5265
  var enabled = true;
@@ -5294,8 +5295,8 @@ var options = {
5294
5295
  supportLevel
5295
5296
  };
5296
5297
  function kolorist(start, end, level = 1) {
5297
- const open = `[${start}m`;
5298
- const close = `[${end}m`;
5298
+ const open = `\x1B[${start}m`;
5299
+ const close = `\x1B[${end}m`;
5299
5300
  const regex = new RegExp(`\\x1b\\[${end}m`, "g");
5300
5301
  return (str) => {
5301
5302
  return options.enabled && options.supportLevel >= level ? open + ("" + str).replace(regex, open) + close : "" + str;
@@ -5343,12 +5344,12 @@ var bgLightCyan = kolorist(106, 49);
5343
5344
  var bgLightGray = kolorist(47, 49);
5344
5345
 
5345
5346
  // utils/renderTemplate.js
5346
- var import_fs = __toModule(require("fs"));
5347
- var import_path = __toModule(require("path"));
5347
+ var import_fs = __toESM(require("fs"), 1);
5348
+ var import_path = __toESM(require("path"), 1);
5348
5349
 
5349
5350
  // utils/deepMerge.js
5350
5351
  var isObject = (val) => val && typeof val === "object";
5351
- var mergeArrayWithDedupe = (a, b) => Array.from(new Set([...a, ...b]));
5352
+ var mergeArrayWithDedupe = (a, b) => Array.from(/* @__PURE__ */ new Set([...a, ...b]));
5352
5353
  function deepMerge(target, obj) {
5353
5354
  for (const key of Object.keys(obj)) {
5354
5355
  const oldVal = target[key];
@@ -5409,8 +5410,8 @@ function renderTemplate(src, dest) {
5409
5410
  var renderTemplate_default = renderTemplate;
5410
5411
 
5411
5412
  // utils/directoryTraverse.js
5412
- var import_fs2 = __toModule(require("fs"));
5413
- var import_path2 = __toModule(require("path"));
5413
+ var import_fs2 = __toESM(require("fs"), 1);
5414
+ var import_path2 = __toESM(require("path"), 1);
5414
5415
  function preOrderDirectoryTraverse(dir, dirCallback, fileCallback) {
5415
5416
  for (const filename of import_fs2.default.readdirSync(dir)) {
5416
5417
  const fullpath = import_path2.default.resolve(dir, filename);
@@ -5436,9 +5437,6 @@ function postOrderDirectoryTraverse(dir, dirCallback, fileCallback) {
5436
5437
  }
5437
5438
  }
5438
5439
 
5439
- // utils/generateReadme.js
5440
- var import_fs3 = __toModule(require("fs"));
5441
-
5442
5440
  // utils/getCommand.js
5443
5441
  function getCommand(packageManager, scriptName) {
5444
5442
  if (scriptName === "install") {
@@ -5514,10 +5512,10 @@ function toValidPackageName(projectName) {
5514
5512
  return projectName.trim().toLowerCase().replace(/\s+/g, "-").replace(/^[._]/, "").replace(/[^a-z0-9-~]+/g, "-");
5515
5513
  }
5516
5514
  function canSafelyOverwrite(dir) {
5517
- return !import_fs4.default.existsSync(dir) || import_fs4.default.readdirSync(dir).length === 0;
5515
+ return !import_fs3.default.existsSync(dir) || import_fs3.default.readdirSync(dir).length === 0;
5518
5516
  }
5519
5517
  function emptyDir(dir) {
5520
- postOrderDirectoryTraverse(dir, (dir2) => import_fs4.default.rmdirSync(dir2), (file) => import_fs4.default.unlinkSync(file));
5518
+ postOrderDirectoryTraverse(dir, (dir2) => import_fs3.default.rmdirSync(dir2), (file) => import_fs3.default.unlinkSync(file));
5521
5519
  }
5522
5520
  async function init() {
5523
5521
  const cwd = process.cwd();
@@ -5619,13 +5617,13 @@ async function init() {
5619
5617
  const root = import_path3.default.join(cwd, targetDir);
5620
5618
  if (shouldOverwrite) {
5621
5619
  emptyDir(root);
5622
- } else if (!import_fs4.default.existsSync(root)) {
5623
- import_fs4.default.mkdirSync(root);
5620
+ } else if (!import_fs3.default.existsSync(root)) {
5621
+ import_fs3.default.mkdirSync(root);
5624
5622
  }
5625
5623
  console.log(`
5626
5624
  Scaffolding project in ${root}...`);
5627
5625
  const pkg = { name: packageName, version: "0.0.0" };
5628
- import_fs4.default.writeFileSync(import_path3.default.resolve(root, "package.json"), JSON.stringify(pkg, null, 2));
5626
+ import_fs3.default.writeFileSync(import_path3.default.resolve(root, "package.json"), JSON.stringify(pkg, null, 2));
5629
5627
  const templateRoot = import_path3.default.resolve(__dirname, "template");
5630
5628
  const render = function render2(templateName) {
5631
5629
  const templateDir = import_path3.default.resolve(templateRoot, templateName);
@@ -5659,27 +5657,27 @@ Scaffolding project in ${root}...`);
5659
5657
  preOrderDirectoryTraverse(root, () => {
5660
5658
  }, (filepath) => {
5661
5659
  if (filepath.endsWith(".js")) {
5662
- import_fs4.default.renameSync(filepath, filepath.replace(/\.js$/, ".ts"));
5660
+ import_fs3.default.renameSync(filepath, filepath.replace(/\.js$/, ".ts"));
5663
5661
  } else if (import_path3.default.basename(filepath) === "jsconfig.json") {
5664
- import_fs4.default.renameSync(filepath, filepath.replace(/jsconfig\.json$/, "tsconfig.json"));
5662
+ import_fs3.default.renameSync(filepath, filepath.replace(/jsconfig\.json$/, "tsconfig.json"));
5665
5663
  }
5666
5664
  });
5667
5665
  const indexHtmlPath = import_path3.default.resolve(root, "index.html");
5668
- const indexHtmlContent = import_fs4.default.readFileSync(indexHtmlPath, "utf8");
5669
- import_fs4.default.writeFileSync(indexHtmlPath, indexHtmlContent.replace("src/main.js", "src/main.ts"));
5666
+ const indexHtmlContent = import_fs3.default.readFileSync(indexHtmlPath, "utf8");
5667
+ import_fs3.default.writeFileSync(indexHtmlPath, indexHtmlContent.replace("src/main.js", "src/main.ts"));
5670
5668
  }
5671
5669
  if (!needsTests) {
5672
5670
  preOrderDirectoryTraverse(root, (dirpath) => {
5673
5671
  const dirname = import_path3.default.basename(dirpath);
5674
5672
  if (dirname === "cypress" || dirname === "__tests__") {
5675
5673
  emptyDir(dirpath);
5676
- import_fs4.default.rmdirSync(dirpath);
5674
+ import_fs3.default.rmdirSync(dirpath);
5677
5675
  }
5678
5676
  }, () => {
5679
5677
  });
5680
5678
  }
5681
5679
  const packageManager = /pnpm/.test(process.env.npm_execpath) ? "pnpm" : /yarn/.test(process.env.npm_execpath) ? "yarn" : "npm";
5682
- import_fs4.default.writeFileSync(import_path3.default.resolve(root, "README.md"), generateReadme({
5680
+ import_fs3.default.writeFileSync(import_path3.default.resolve(root, "README.md"), generateReadme({
5683
5681
  projectName: result.projectName || defaultProjectName,
5684
5682
  packageManager,
5685
5683
  needsTypeScript,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-vue",
3
- "version": "2.0.6",
3
+ "version": "2.1.0-beta",
4
4
  "description": "An easy way to start a Vue project",
5
5
  "type": "module",
6
6
  "bin": {
@@ -25,14 +25,16 @@
25
25
  },
26
26
  "homepage": "https://github.com/vuejs/create-vue#readme",
27
27
  "devDependencies": {
28
- "esbuild": "^0.13.15",
29
- "husky": "^7.0.4",
28
+ "esbuild": "^0.14.48",
29
+ "esbuild-plugin-license": "^1.2.2",
30
+ "husky": "^8.0.1",
30
31
  "kolorist": "^1.5.1",
31
- "lint-staged": "^12.3.4",
32
- "minimist": "^1.2.5",
32
+ "lint-staged": "^12.5.0",
33
+ "minimist": "^1.2.6",
33
34
  "npm-run-all": "^4.1.5",
34
- "prettier": "^2.5.1",
35
- "prompts": "^2.4.2"
35
+ "prettier": "^2.7.1",
36
+ "prompts": "^2.4.2",
37
+ "zx": "^4.3.0"
36
38
  },
37
39
  "lint-staged": {
38
40
  "*.{js,ts,vue,json}": [
@@ -41,9 +43,9 @@
41
43
  },
42
44
  "scripts": {
43
45
  "format": "prettier --write .",
44
- "build": "esbuild --bundle index.js --format=cjs --platform=node --outfile=outfile.cjs",
45
- "snapshot": "node snapshot.js",
46
+ "build": "zx ./scripts/build.mjs",
47
+ "snapshot": "zx ./scripts/snapshot.mjs",
46
48
  "pretest": "run-s build snapshot",
47
- "test": "node test.js"
49
+ "test": "zx ./scripts/test.mjs"
48
50
  }
49
51
  }
@@ -5,16 +5,11 @@
5
5
  "preview": "vite preview --port 5050"
6
6
  },
7
7
  "dependencies": {
8
- "@vue/composition-api": "^1.4.6",
9
- "vue": "^2.6.14"
8
+ "vue": "^2.7.0-0"
10
9
  },
11
10
  "devDependencies": {
12
11
  "@vitejs/plugin-legacy": "^1.7.1",
13
- "@vue/runtime-dom": "^3.2.31",
14
- "unplugin-vue2-script-setup": "^0.9.3",
15
- "vite": "^2.8.4",
16
- "vite-plugin-vue2": "^1.9.3",
17
- "vue-template-babel-compiler": "^1.2.0",
18
- "vue-template-compiler": "^2.6.14"
12
+ "@vitejs/plugin-vue2": "^1.1.1",
13
+ "vite": "^2.8.4"
19
14
  }
20
15
  }
@@ -2,21 +2,12 @@ import { fileURLToPath } from 'url'
2
2
 
3
3
  import { defineConfig } from 'vite'
4
4
  import legacy from '@vitejs/plugin-legacy'
5
- import { createVuePlugin as vue2 } from 'vite-plugin-vue2'
6
- // @ts-ignore
7
- import vueTemplateBabelCompiler from 'vue-template-babel-compiler'
8
- import scriptSetup from 'unplugin-vue2-script-setup/vite'
5
+ import vue2 from '@vitejs/plugin-vue2'
9
6
 
10
7
  // https://vitejs.dev/config/
11
8
  export default defineConfig({
12
9
  plugins: [
13
- vue2({
14
- jsx: true,
15
- vueTemplateOptions: {
16
- compiler: vueTemplateBabelCompiler
17
- }
18
- }),
19
- scriptSetup(),
10
+ vue2(),
20
11
  legacy({
21
12
  targets: ['ie >= 11'],
22
13
  additionalLegacyPolyfills: ['regenerator-runtime/runtime']
@@ -2,8 +2,6 @@
2
2
  <template>
3
3
  <svg
4
4
  xmlns="http://www.w3.org/2000/svg"
5
- xmlns:xlink="http://www.w3.org/1999/xlink"
6
- aria-hidden="true"
7
5
  role="img"
8
6
  class="iconify iconify--mdi"
9
7
  width="24"
@@ -2,8 +2,6 @@
2
2
  <template>
3
3
  <svg
4
4
  xmlns="http://www.w3.org/2000/svg"
5
- xmlns:xlink="http://www.w3.org/1999/xlink"
6
- aria-hidden="true"
7
5
  role="img"
8
6
  class="iconify iconify--mdi"
9
7
  width="24"
@@ -2,8 +2,6 @@
2
2
  <template>
3
3
  <svg
4
4
  xmlns="http://www.w3.org/2000/svg"
5
- xmlns:xlink="http://www.w3.org/1999/xlink"
6
- aria-hidden="true"
7
5
  role="img"
8
6
  class="iconify iconify--mdi"
9
7
  width="24"
@@ -2,8 +2,6 @@
2
2
  <template>
3
3
  <svg
4
4
  xmlns="http://www.w3.org/2000/svg"
5
- xmlns:xlink="http://www.w3.org/1999/xlink"
6
- aria-hidden="true"
7
5
  role="img"
8
6
  class="iconify iconify--mdi"
9
7
  width="24"
@@ -9,6 +9,7 @@
9
9
  "@cypress/vite-dev-server": "^2.2.2",
10
10
  "@cypress/vue": "^2.2.4",
11
11
  "cypress": "^9.5.0",
12
- "start-server-and-test": "^1.14.0"
12
+ "start-server-and-test": "^1.14.0",
13
+ "vue-template-compiler": "^2.7.0-0"
13
14
  }
14
15
  }
@@ -1,2 +1 @@
1
1
  /// <reference types="vite/client" />
2
- /// <reference types="unplugin-vue2-script-setup/shims" />
@@ -6,6 +6,6 @@
6
6
  "devDependencies": {
7
7
  "@types/node": "^16.11.25",
8
8
  "typescript": "~4.7.3",
9
- "vue-tsc": "^0.37.3"
9
+ "vue-tsc": "^0.38.2"
10
10
  }
11
11
  }
@@ -18,7 +18,7 @@
18
18
  "skipLibCheck": true
19
19
  },
20
20
  "vueCompilerOptions": {
21
- "target": 2
21
+ "target": 2.7
22
22
  },
23
23
  "include": ["vite.config.*", "env.d.ts", "src/**/*", "src/**/*.vue"]
24
24
  }
@@ -1,12 +1,6 @@
1
1
  import Vue from 'vue'
2
- import VueCompositionAPI, { createApp, h } from '@vue/composition-api'
3
-
4
2
  import App from './App.vue'
5
3
 
6
- Vue.use(VueCompositionAPI)
7
-
8
- const app = createApp({
9
- render: () => h(App)
10
- })
11
-
12
- app.mount('#app')
4
+ new Vue({
5
+ render: (h) => h(App)
6
+ }).$mount('#app')
@@ -1,15 +1,11 @@
1
1
  import Vue from 'vue'
2
- import VueCompositionAPI, { createApp, h } from '@vue/composition-api'
3
2
  import { createPinia, PiniaVuePlugin } from 'pinia'
4
3
 
5
4
  import App from './App.vue'
6
5
 
7
- Vue.use(VueCompositionAPI)
6
+ Vue.use(PiniaVuePlugin)
8
7
 
9
- const app = createApp({
8
+ new Vue({
10
9
  pinia: createPinia(),
11
- render: () => h(App)
12
- })
13
- app.use(PiniaVuePlugin)
14
-
15
- app.mount('#app')
10
+ render: (h) => h(App)
11
+ }).$mount('#app')
@@ -1,14 +1,9 @@
1
1
  import Vue from 'vue'
2
- import VueCompositionAPI, { createApp, h } from '@vue/composition-api'
3
2
 
4
3
  import App from './App.vue'
5
4
  import router from './router'
6
5
 
7
- Vue.use(VueCompositionAPI)
8
-
9
- const app = createApp({
6
+ new Vue({
10
7
  router,
11
- render: () => h(App)
12
- })
13
-
14
- app.mount('#app')
8
+ render: (h) => h(App)
9
+ }).$mount('#app')
@@ -1,17 +1,13 @@
1
1
  import Vue from 'vue'
2
- import VueCompositionAPI, { createApp, h } from '@vue/composition-api'
3
2
  import { createPinia, PiniaVuePlugin } from 'pinia'
4
3
 
5
4
  import App from './App.vue'
6
5
  import router from './router'
7
6
 
8
- Vue.use(VueCompositionAPI)
7
+ Vue.use(PiniaVuePlugin)
9
8
 
10
- const app = createApp({
9
+ new Vue({
11
10
  router,
12
11
  pinia: createPinia(),
13
- render: () => h(App)
14
- })
15
- app.use(PiniaVuePlugin)
16
-
17
- app.mount('#app')
12
+ render: (h) => h(App)
13
+ }).$mount('#app')