create-vue 3.0.7 → 3.1.3
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 +153 -1
- package/outfile.cjs +98 -41
- package/package.json +14 -14
- package/template/base/_gitignore +1 -0
- package/template/base/node_modules/.bin/vite +4 -4
- package/template/base/package.json +3 -3
- package/template/{code/default → config/cypress}/cypress/integration/example.spec.js +0 -0
- package/template/config/cypress/cypress/plugins/index.js +0 -5
- package/template/config/cypress/cypress/plugins/index.ts +19 -0
- package/template/config/cypress/cypress.json +1 -5
- package/template/config/cypress/node_modules/.bin/cypress +4 -4
- package/template/config/cypress/package.json +1 -5
- package/template/config/cypress-ct/cypress/plugins/index.js +29 -0
- package/template/config/{typescript → cypress-ct}/cypress/plugins/index.ts +0 -2
- package/template/config/cypress-ct/cypress.json +7 -0
- package/template/config/cypress-ct/node_modules/.bin/cypress +17 -0
- package/template/config/cypress-ct/node_modules/.bin/vite +17 -0
- package/template/config/cypress-ct/package.json +15 -0
- package/template/{code/default → config/cypress-ct}/src/components/__tests__/HelloWorld.spec.js +0 -0
- package/template/config/pinia/package.json +2 -1
- package/template/config/router/package.json +1 -0
- package/template/config/typescript/node_modules/.bin/tsc +4 -4
- package/template/config/typescript/node_modules/.bin/tsserver +4 -4
- package/template/config/typescript/node_modules/.bin/vue-tsc +4 -4
- package/template/config/typescript/package.json +3 -3
- package/template/config/typescript/tsconfig.json +1 -2
- package/template/config/vitest/node_modules/.bin/vitest +17 -0
- package/template/config/vitest/package.json +13 -0
- package/template/config/vitest/src/components/__tests__/HelloWorld.spec.js +11 -0
- package/template/config/vuex/package.json +1 -0
- package/template/tsconfig/base/package.json +5 -0
- package/template/tsconfig/base/tsconfig.json +16 -0
- package/template/tsconfig/base/tsconfig.vite-config.json +8 -0
- package/template/tsconfig/cypress/cypress/plugins/tsconfig.json +9 -0
- package/template/tsconfig/cypress/cypress/tsconfig.json +10 -0
- package/template/tsconfig/vitest/package.json +5 -0
- package/template/tsconfig/vitest/tsconfig.json +20 -0
- package/template/tsconfig/vitest/tsconfig.vitest.json +8 -0
- package/template/code/router/cypress/integration/example.spec.js +0 -13
- package/template/code/router/src/components/__tests__/HelloWorld.spec.js +0 -13
- package/template/code/typescript-default/cypress/integration/example.spec.ts +0 -8
- package/template/code/typescript-default/src/components/__tests__/HelloWorld.spec.ts +0 -13
- package/template/code/typescript-router/cypress/integration/example.spec.ts +0 -13
- package/template/code/typescript-router/src/components/__tests__/HelloWorld.spec.ts +0 -13
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,10 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
/*! create-vue v3.1.3 | 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;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
8
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
9
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
8
23
|
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
9
24
|
var __commonJS = (cb, mod) => function __require() {
|
|
10
25
|
return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
@@ -5181,7 +5196,7 @@ var require_lib = __commonJS({
|
|
|
5181
5196
|
for (question of questions) {
|
|
5182
5197
|
({ name, type } = question);
|
|
5183
5198
|
if (typeof type === "function") {
|
|
5184
|
-
type = await type(answer, {
|
|
5199
|
+
type = await type(answer, __spreadValues({}, answers), question);
|
|
5185
5200
|
question["type"] = type;
|
|
5186
5201
|
}
|
|
5187
5202
|
if (!type)
|
|
@@ -5190,7 +5205,7 @@ var require_lib = __commonJS({
|
|
|
5190
5205
|
if (passOn.includes(key))
|
|
5191
5206
|
continue;
|
|
5192
5207
|
let value = question[key];
|
|
5193
|
-
question[key] = typeof value === "function" ? await value(answer, {
|
|
5208
|
+
question[key] = typeof value === "function" ? await value(answer, __spreadValues({}, answers), lastPrompt) : value;
|
|
5194
5209
|
}
|
|
5195
5210
|
lastPrompt = question;
|
|
5196
5211
|
if (typeof question.message !== "string") {
|
|
@@ -5377,10 +5392,7 @@ function sortDependencies(packageJson) {
|
|
|
5377
5392
|
});
|
|
5378
5393
|
}
|
|
5379
5394
|
}
|
|
5380
|
-
return {
|
|
5381
|
-
...packageJson,
|
|
5382
|
-
...sorted
|
|
5383
|
-
};
|
|
5395
|
+
return __spreadValues(__spreadValues({}, packageJson), sorted);
|
|
5384
5396
|
}
|
|
5385
5397
|
|
|
5386
5398
|
// utils/renderTemplate.js
|
|
@@ -5457,7 +5469,7 @@ var sfcTypeSupportDoc = [
|
|
|
5457
5469
|
"",
|
|
5458
5470
|
"TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.",
|
|
5459
5471
|
"",
|
|
5460
|
-
"If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471) that is more performant. You can enable it by the following steps:",
|
|
5472
|
+
"If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:",
|
|
5461
5473
|
"",
|
|
5462
5474
|
"1. Disable the built-in TypeScript Extension",
|
|
5463
5475
|
" 1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette",
|
|
@@ -5469,7 +5481,9 @@ function generateReadme({
|
|
|
5469
5481
|
projectName,
|
|
5470
5482
|
packageManager,
|
|
5471
5483
|
needsTypeScript,
|
|
5472
|
-
|
|
5484
|
+
needsCypress,
|
|
5485
|
+
needsCypressCT,
|
|
5486
|
+
needsVitest,
|
|
5473
5487
|
needsEslint
|
|
5474
5488
|
}) {
|
|
5475
5489
|
let readme = `# ${projectName}
|
|
@@ -5503,14 +5517,26 @@ ${getCommand(packageManager, "dev")}
|
|
|
5503
5517
|
${getCommand(packageManager, "build")}
|
|
5504
5518
|
\`\`\`
|
|
5505
5519
|
`;
|
|
5506
|
-
if (
|
|
5520
|
+
if (needsVitest) {
|
|
5521
|
+
npmScriptsDescriptions += `
|
|
5522
|
+
### Run Unit Tests with [Vitest](https://vitest.dev/)
|
|
5523
|
+
|
|
5524
|
+
\`\`\`sh
|
|
5525
|
+
${getCommand(packageManager, "test:unit")}
|
|
5526
|
+
\`\`\`
|
|
5527
|
+
`;
|
|
5528
|
+
}
|
|
5529
|
+
if (needsCypressCT) {
|
|
5507
5530
|
npmScriptsDescriptions += `
|
|
5508
5531
|
### Run Unit Tests with [Cypress Component Testing](https://docs.cypress.io/guides/component-testing/introduction)
|
|
5509
5532
|
|
|
5510
5533
|
\`\`\`sh
|
|
5511
5534
|
${getCommand(packageManager, "test:unit")} # or \`${getCommand(packageManager, "test:unit:ci")}\` for headless testing
|
|
5512
5535
|
\`\`\`
|
|
5513
|
-
|
|
5536
|
+
`;
|
|
5537
|
+
}
|
|
5538
|
+
if (needsCypress) {
|
|
5539
|
+
npmScriptsDescriptions += `
|
|
5514
5540
|
### Run End-to-End Tests with [Cypress](https://www.cypress.io/)
|
|
5515
5541
|
|
|
5516
5542
|
\`\`\`sh
|
|
@@ -5561,13 +5587,7 @@ var config = {
|
|
|
5561
5587
|
"vue/setup-compiler-macros": true
|
|
5562
5588
|
}
|
|
5563
5589
|
};
|
|
5564
|
-
|
|
5565
|
-
{
|
|
5566
|
-
files: ["**/__tests__/*.spec.{js,ts,jsx,tsx}", "cypress/integration/**.spec.{js,ts,jsx,tsx}"],
|
|
5567
|
-
extends: ["plugin:cypress/recommended"]
|
|
5568
|
-
}
|
|
5569
|
-
];
|
|
5570
|
-
function configureEslint({ language, styleGuide, needsPrettier, needsCypress }) {
|
|
5590
|
+
function configureEslint({ language, styleGuide, needsPrettier, needsCypress, needsCypressCT }) {
|
|
5571
5591
|
switch (`${styleGuide}-${language}`) {
|
|
5572
5592
|
case "default-javascript":
|
|
5573
5593
|
config.extends.push("eslint:recommended");
|
|
@@ -5584,6 +5604,12 @@ function configureEslint({ language, styleGuide, needsPrettier, needsCypress })
|
|
|
5584
5604
|
config.extends.push("@vue/eslint-config-prettier");
|
|
5585
5605
|
}
|
|
5586
5606
|
if (needsCypress) {
|
|
5607
|
+
const cypressOverrides = [
|
|
5608
|
+
{
|
|
5609
|
+
files: needsCypressCT ? ["**/__tests__/*.spec.{js,ts,jsx,tsx}", "cypress/integration/**.spec.{js,ts,jsx,tsx}"] : ["cypress/integration/**.spec.{js,ts,jsx,tsx}"],
|
|
5610
|
+
extends: ["plugin:cypress/recommended"]
|
|
5611
|
+
}
|
|
5612
|
+
];
|
|
5587
5613
|
addEslintDependency("eslint-plugin-cypress");
|
|
5588
5614
|
config.overrides = cypressOverrides;
|
|
5589
5615
|
}
|
|
@@ -5601,12 +5627,13 @@ function configureEslint({ language, styleGuide, needsPrettier, needsCypress })
|
|
|
5601
5627
|
configuration
|
|
5602
5628
|
};
|
|
5603
5629
|
}
|
|
5604
|
-
function renderEslint(rootDir, { needsTypeScript,
|
|
5630
|
+
function renderEslint(rootDir, { needsTypeScript, needsCypress, needsCypressCT, needsPrettier }) {
|
|
5605
5631
|
const { dependencies: dependencies2, configuration } = configureEslint({
|
|
5606
5632
|
language: needsTypeScript ? "typescript" : "javascript",
|
|
5607
5633
|
styleGuide: "default",
|
|
5608
5634
|
needsPrettier,
|
|
5609
|
-
needsCypress
|
|
5635
|
+
needsCypress,
|
|
5636
|
+
needsCypressCT
|
|
5610
5637
|
});
|
|
5611
5638
|
const packageJsonPath = import_path3.default.resolve(rootDir, "package.json");
|
|
5612
5639
|
const existingPkg = JSON.parse(import_fs4.default.readFileSync(packageJsonPath));
|
|
@@ -5636,6 +5663,9 @@ function canSafelyOverwrite(dir) {
|
|
|
5636
5663
|
return !import_fs5.default.existsSync(dir) || import_fs5.default.readdirSync(dir).length === 0;
|
|
5637
5664
|
}
|
|
5638
5665
|
function emptyDir(dir) {
|
|
5666
|
+
if (!import_fs5.default.existsSync(dir)) {
|
|
5667
|
+
return;
|
|
5668
|
+
}
|
|
5639
5669
|
postOrderDirectoryTraverse(dir, (dir2) => import_fs5.default.rmdirSync(dir2), (file) => import_fs5.default.unlinkSync(file));
|
|
5640
5670
|
}
|
|
5641
5671
|
async function init() {
|
|
@@ -5646,12 +5676,12 @@ ${banner_default}
|
|
|
5646
5676
|
const argv = (0, import_minimist.default)(process.argv.slice(2), {
|
|
5647
5677
|
alias: {
|
|
5648
5678
|
typescript: ["ts"],
|
|
5649
|
-
"with-tests": ["tests"
|
|
5679
|
+
"with-tests": ["tests"],
|
|
5650
5680
|
router: ["vue-router"]
|
|
5651
5681
|
},
|
|
5652
5682
|
boolean: true
|
|
5653
5683
|
});
|
|
5654
|
-
const isFeatureFlagsUsed = typeof (argv.default || argv.ts || argv.jsx || argv.router || argv.pinia || argv.tests || argv.eslint) === "boolean";
|
|
5684
|
+
const isFeatureFlagsUsed = typeof (argv.default || argv.ts || argv.jsx || argv.router || argv.pinia || argv.tests || argv.vitest || argv.cypress || argv.eslint) === "boolean";
|
|
5655
5685
|
let targetDir = argv._[0];
|
|
5656
5686
|
const defaultProjectName = !targetDir ? "vue-project" : targetDir;
|
|
5657
5687
|
const forceOverwrite = argv.force;
|
|
@@ -5722,9 +5752,17 @@ ${banner_default}
|
|
|
5722
5752
|
inactive: "No"
|
|
5723
5753
|
},
|
|
5724
5754
|
{
|
|
5725
|
-
name: "
|
|
5755
|
+
name: "needsVitest",
|
|
5756
|
+
type: () => isFeatureFlagsUsed ? null : "toggle",
|
|
5757
|
+
message: "Add Vitest for Unit Testing?",
|
|
5758
|
+
initial: false,
|
|
5759
|
+
active: "Yes",
|
|
5760
|
+
inactive: "No"
|
|
5761
|
+
},
|
|
5762
|
+
{
|
|
5763
|
+
name: "needsCypress",
|
|
5726
5764
|
type: () => isFeatureFlagsUsed ? null : "toggle",
|
|
5727
|
-
message: "Add Cypress for testing?",
|
|
5765
|
+
message: (prev, answers) => answers.needsVitest ? "Add Cypress for End-to-End testing?" : "Add Cypress for both Unit and End-to-End testing?",
|
|
5728
5766
|
initial: false,
|
|
5729
5767
|
active: "Yes",
|
|
5730
5768
|
inactive: "No"
|
|
@@ -5760,18 +5798,21 @@ ${banner_default}
|
|
|
5760
5798
|
process.exit(1);
|
|
5761
5799
|
}
|
|
5762
5800
|
const {
|
|
5763
|
-
|
|
5764
|
-
|
|
5801
|
+
projectName,
|
|
5802
|
+
packageName = projectName,
|
|
5803
|
+
shouldOverwrite = argv.force,
|
|
5765
5804
|
needsJsx = argv.jsx,
|
|
5766
5805
|
needsTypeScript = argv.typescript,
|
|
5767
5806
|
needsRouter = argv.router,
|
|
5768
5807
|
needsPinia = argv.pinia,
|
|
5769
|
-
|
|
5808
|
+
needsCypress = argv.cypress || argv.tests,
|
|
5809
|
+
needsVitest = argv.vitest || argv.tests,
|
|
5770
5810
|
needsEslint = argv.eslint || argv["eslint-with-prettier"],
|
|
5771
5811
|
needsPrettier = argv["eslint-with-prettier"]
|
|
5772
5812
|
} = result;
|
|
5813
|
+
const needsCypressCT = needsCypress && !needsVitest;
|
|
5773
5814
|
const root = import_path4.default.join(cwd, targetDir);
|
|
5774
|
-
if (shouldOverwrite) {
|
|
5815
|
+
if (import_fs5.default.existsSync(root) && shouldOverwrite) {
|
|
5775
5816
|
emptyDir(root);
|
|
5776
5817
|
} else if (!import_fs5.default.existsSync(root)) {
|
|
5777
5818
|
import_fs5.default.mkdirSync(root);
|
|
@@ -5795,14 +5836,27 @@ Scaffolding project in ${root}...`);
|
|
|
5795
5836
|
if (needsPinia) {
|
|
5796
5837
|
render("config/pinia");
|
|
5797
5838
|
}
|
|
5798
|
-
if (
|
|
5839
|
+
if (needsVitest) {
|
|
5840
|
+
render("config/vitest");
|
|
5841
|
+
}
|
|
5842
|
+
if (needsCypress) {
|
|
5799
5843
|
render("config/cypress");
|
|
5800
5844
|
}
|
|
5845
|
+
if (needsCypressCT) {
|
|
5846
|
+
render("config/cypress-ct");
|
|
5847
|
+
}
|
|
5801
5848
|
if (needsTypeScript) {
|
|
5802
5849
|
render("config/typescript");
|
|
5850
|
+
render("tsconfig/base");
|
|
5851
|
+
if (needsCypress) {
|
|
5852
|
+
render("tsconfig/cypress");
|
|
5853
|
+
}
|
|
5854
|
+
if (needsVitest) {
|
|
5855
|
+
render("tsconfig/vitest");
|
|
5856
|
+
}
|
|
5803
5857
|
}
|
|
5804
5858
|
if (needsEslint) {
|
|
5805
|
-
renderEslint(root, { needsTypeScript,
|
|
5859
|
+
renderEslint(root, { needsTypeScript, needsCypress, needsCypressCT, needsPrettier });
|
|
5806
5860
|
}
|
|
5807
5861
|
const codeTemplate = (needsTypeScript ? "typescript-" : "") + (needsRouter ? "router" : "default");
|
|
5808
5862
|
render(`code/${codeTemplate}`);
|
|
@@ -5826,29 +5880,29 @@ Scaffolding project in ${root}...`);
|
|
|
5826
5880
|
import_fs5.default.renameSync(filepath, tsFilePath);
|
|
5827
5881
|
}
|
|
5828
5882
|
} else if (import_path4.default.basename(filepath) === "jsconfig.json") {
|
|
5829
|
-
import_fs5.default.
|
|
5883
|
+
import_fs5.default.unlinkSync(filepath);
|
|
5830
5884
|
}
|
|
5831
5885
|
});
|
|
5832
5886
|
const indexHtmlPath = import_path4.default.resolve(root, "index.html");
|
|
5833
5887
|
const indexHtmlContent = import_fs5.default.readFileSync(indexHtmlPath, "utf8");
|
|
5834
5888
|
import_fs5.default.writeFileSync(indexHtmlPath, indexHtmlContent.replace("src/main.js", "src/main.ts"));
|
|
5835
|
-
}
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
import_fs5.default.rmdirSync(dirpath);
|
|
5842
|
-
}
|
|
5843
|
-
}, () => {
|
|
5889
|
+
} else {
|
|
5890
|
+
preOrderDirectoryTraverse(root, () => {
|
|
5891
|
+
}, (filepath) => {
|
|
5892
|
+
if (filepath.endsWith(".ts")) {
|
|
5893
|
+
import_fs5.default.unlinkSync(filepath);
|
|
5894
|
+
}
|
|
5844
5895
|
});
|
|
5845
5896
|
}
|
|
5846
|
-
const
|
|
5897
|
+
const userAgent = process.env.npm_config_user_agent ?? "";
|
|
5898
|
+
const packageManager = /pnpm/.test(userAgent) ? "pnpm" : /yarn/.test(userAgent) ? "yarn" : "npm";
|
|
5847
5899
|
import_fs5.default.writeFileSync(import_path4.default.resolve(root, "README.md"), generateReadme({
|
|
5848
5900
|
projectName: result.projectName || defaultProjectName,
|
|
5849
5901
|
packageManager,
|
|
5850
5902
|
needsTypeScript,
|
|
5851
|
-
|
|
5903
|
+
needsVitest,
|
|
5904
|
+
needsCypress,
|
|
5905
|
+
needsCypressCT,
|
|
5852
5906
|
needsEslint
|
|
5853
5907
|
}));
|
|
5854
5908
|
console.log(`
|
|
@@ -5858,6 +5912,9 @@ Done. Now run:
|
|
|
5858
5912
|
console.log(` ${bold(green(`cd ${import_path4.default.relative(cwd, root)}`))}`);
|
|
5859
5913
|
}
|
|
5860
5914
|
console.log(` ${bold(green(getCommand(packageManager, "install")))}`);
|
|
5915
|
+
if (needsPrettier) {
|
|
5916
|
+
console.log(` ${bold(green(getCommand(packageManager, "lint")))}`);
|
|
5917
|
+
}
|
|
5861
5918
|
console.log(` ${bold(green(getCommand(packageManager, "dev")))}`);
|
|
5862
5919
|
console.log();
|
|
5863
5920
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-vue",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.3",
|
|
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": "zx ./scripts/prepublish.mjs"
|
|
24
|
-
},
|
|
25
16
|
"repository": {
|
|
26
17
|
"type": "git",
|
|
27
18
|
"url": "git+https://github.com/vuejs/create-vue.git"
|
|
@@ -35,18 +26,27 @@
|
|
|
35
26
|
"homepage": "https://github.com/vuejs/create-vue#readme",
|
|
36
27
|
"devDependencies": {
|
|
37
28
|
"esbuild": "^0.13.15",
|
|
29
|
+
"esbuild-plugin-license": "^1.1.0",
|
|
38
30
|
"husky": "^7.0.4",
|
|
39
31
|
"kolorist": "^1.5.1",
|
|
40
|
-
"lint-staged": "^12.
|
|
32
|
+
"lint-staged": "^12.3.3",
|
|
41
33
|
"minimist": "^1.2.5",
|
|
42
34
|
"npm-run-all": "^4.1.5",
|
|
43
35
|
"prettier": "^2.5.1",
|
|
44
36
|
"prompts": "^2.4.2",
|
|
45
|
-
"zx": "^4.
|
|
37
|
+
"zx": "^4.3.0"
|
|
46
38
|
},
|
|
47
39
|
"lint-staged": {
|
|
48
40
|
"*.{js,ts,vue,json}": [
|
|
49
41
|
"prettier --write"
|
|
50
42
|
]
|
|
51
|
-
}
|
|
52
|
-
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"format": "prettier --write .",
|
|
46
|
+
"build": "zx ./scripts/build.mjs",
|
|
47
|
+
"snapshot": "zx ./scripts/snapshot.mjs",
|
|
48
|
+
"pretest": "run-s build snapshot",
|
|
49
|
+
"test": "zx ./scripts/test.mjs"
|
|
50
|
+
},
|
|
51
|
+
"readme": "# create-vue\n\n[](https://open.vscode.dev/vuejs/create-vue)\n\nAn easy way to start a Vue project\n\n## Usage\n\n```sh\nnpm init vue@3\n```\n\nOr, if you need to support IE11, you can create a Vue 2 project with:\n\n```sh\nnpm init vue@2\n```\n"
|
|
52
|
+
}
|
package/template/base/_gitignore
CHANGED
|
@@ -6,12 +6,12 @@ case `uname` in
|
|
|
6
6
|
esac
|
|
7
7
|
|
|
8
8
|
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vite@2.7.
|
|
9
|
+
export NODE_PATH="/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vite@2.7.13/node_modules/vite/bin/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vite@2.7.13/node_modules/vite/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vite@2.7.13/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules:/Users/haoqun/Developer/vuejs/node_modules:/Users/haoqun/Developer/node_modules:/Users/haoqun/node_modules:/Users/node_modules:/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/base/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vite@2.7.
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vite@2.7.13/node_modules/vite/bin/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vite@2.7.13/node_modules/vite/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vite@2.7.13/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules:/Users/haoqun/Developer/vuejs/node_modules:/Users/haoqun/Developer/node_modules:/Users/haoqun/node_modules:/Users/node_modules:/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/base/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/node_modules"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/vite@2.7.
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/vite@2.7.13/node_modules/vite/bin/vite.js" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir/../../../../node_modules/.pnpm/vite@2.7.
|
|
16
|
+
exec node "$basedir/../../../../node_modules/.pnpm/vite@2.7.13/node_modules/vite/bin/vite.js" "$@"
|
|
17
17
|
fi
|
|
File without changes
|
|
@@ -13,8 +13,6 @@
|
|
|
13
13
|
// This function is called when a project is opened or re-opened (e.g. due to
|
|
14
14
|
// the project's config changing)
|
|
15
15
|
|
|
16
|
-
const { startDevServer } = require('@cypress/vite-dev-server')
|
|
17
|
-
|
|
18
16
|
/**
|
|
19
17
|
* @type {Cypress.PluginConfig}
|
|
20
18
|
*/
|
|
@@ -22,8 +20,5 @@ const { startDevServer } = require('@cypress/vite-dev-server')
|
|
|
22
20
|
module.exports = (on, config) => {
|
|
23
21
|
// `on` is used to hook into various events Cypress emits
|
|
24
22
|
// `config` is the resolved Cypress config
|
|
25
|
-
on('dev-server:start', (options) => {
|
|
26
|
-
return startDevServer({ options })
|
|
27
|
-
})
|
|
28
23
|
return config
|
|
29
24
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* eslint-env node */
|
|
2
|
+
// ***********************************************************
|
|
3
|
+
// This example plugins/index.ts can be used to load plugins
|
|
4
|
+
//
|
|
5
|
+
// You can change the location of this file or turn off loading
|
|
6
|
+
// the plugins file with the 'pluginsFile' configuration option.
|
|
7
|
+
//
|
|
8
|
+
// You can read more here:
|
|
9
|
+
// https://on.cypress.io/plugins-guide
|
|
10
|
+
// ***********************************************************
|
|
11
|
+
|
|
12
|
+
// This function is called when a project is opened or re-opened (e.g. due to
|
|
13
|
+
// the project's config changing)
|
|
14
|
+
|
|
15
|
+
export default ((on, config) => {
|
|
16
|
+
// `on` is used to hook into various events Cypress emits
|
|
17
|
+
// `config` is the resolved Cypress config
|
|
18
|
+
return config
|
|
19
|
+
}) as Cypress.PluginConfig
|
|
@@ -6,12 +6,12 @@ case `uname` in
|
|
|
6
6
|
esac
|
|
7
7
|
|
|
8
8
|
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/cypress@9.
|
|
9
|
+
export NODE_PATH="/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/cypress@9.4.1/node_modules/cypress/bin/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/cypress@9.4.1/node_modules/cypress/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/cypress@9.4.1/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules:/Users/haoqun/Developer/vuejs/node_modules:/Users/haoqun/Developer/node_modules:/Users/haoqun/node_modules:/Users/node_modules:/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/config/cypress/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/config/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/cypress@9.
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/cypress@9.4.1/node_modules/cypress/bin/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/cypress@9.4.1/node_modules/cypress/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/cypress@9.4.1/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules:/Users/haoqun/Developer/vuejs/node_modules:/Users/haoqun/Developer/node_modules:/Users/haoqun/node_modules:/Users/node_modules:/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/config/cypress/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/config/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/node_modules"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/cypress@9.
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/cypress@9.4.1/node_modules/cypress/bin/cypress" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/cypress@9.
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/cypress@9.4.1/node_modules/cypress/bin/cypress" "$@"
|
|
17
17
|
fi
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"scripts": {
|
|
3
|
-
"test:unit": "cypress open-ct",
|
|
4
|
-
"test:unit:ci": "cypress run-ct --quiet --reporter spec",
|
|
5
3
|
"test:e2e": "start-server-and-test preview http://127.0.0.1:5050/ 'cypress open'",
|
|
6
4
|
"test:e2e:ci": "start-server-and-test preview http://127.0.0.1:5050/ 'cypress run'"
|
|
7
5
|
},
|
|
8
6
|
"devDependencies": {
|
|
9
|
-
"
|
|
10
|
-
"@cypress/vue": "^3.1.0",
|
|
11
|
-
"cypress": "^9.2.0",
|
|
7
|
+
"cypress": "^9.4.1",
|
|
12
8
|
"start-server-and-test": "^1.14.0"
|
|
13
9
|
}
|
|
14
10
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* eslint-env node */
|
|
2
|
+
/// <reference types="cypress" />
|
|
3
|
+
// ***********************************************************
|
|
4
|
+
// This example plugins/index.js can be used to load plugins
|
|
5
|
+
//
|
|
6
|
+
// You can change the location of this file or turn off loading
|
|
7
|
+
// the plugins file with the 'pluginsFile' configuration option.
|
|
8
|
+
//
|
|
9
|
+
// You can read more here:
|
|
10
|
+
// https://on.cypress.io/plugins-guide
|
|
11
|
+
// ***********************************************************
|
|
12
|
+
|
|
13
|
+
// This function is called when a project is opened or re-opened (e.g. due to
|
|
14
|
+
// the project's config changing)
|
|
15
|
+
|
|
16
|
+
const { startDevServer } = require('@cypress/vite-dev-server')
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @type {Cypress.PluginConfig}
|
|
20
|
+
*/
|
|
21
|
+
// eslint-disable-next-line no-unused-vars
|
|
22
|
+
module.exports = (on, config) => {
|
|
23
|
+
// `on` is used to hook into various events Cypress emits
|
|
24
|
+
// `config` is the resolved Cypress config
|
|
25
|
+
on('dev-server:start', (options) => {
|
|
26
|
+
return startDevServer({ options })
|
|
27
|
+
})
|
|
28
|
+
return config
|
|
29
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
6
|
+
esac
|
|
7
|
+
|
|
8
|
+
if [ -z "$NODE_PATH" ]; then
|
|
9
|
+
export NODE_PATH="/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/cypress@9.4.1/node_modules/cypress/bin/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/cypress@9.4.1/node_modules/cypress/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/cypress@9.4.1/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules:/Users/haoqun/Developer/vuejs/node_modules:/Users/haoqun/Developer/node_modules:/Users/haoqun/node_modules:/Users/node_modules:/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/config/cypress-ct/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/config/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/node_modules"
|
|
10
|
+
else
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/cypress@9.4.1/node_modules/cypress/bin/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/cypress@9.4.1/node_modules/cypress/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/cypress@9.4.1/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules:/Users/haoqun/Developer/vuejs/node_modules:/Users/haoqun/Developer/node_modules:/Users/haoqun/node_modules:/Users/node_modules:/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/config/cypress-ct/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/config/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/node_modules"
|
|
12
|
+
fi
|
|
13
|
+
if [ -x "$basedir/node" ]; then
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/cypress@9.4.1/node_modules/cypress/bin/cypress" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/cypress@9.4.1/node_modules/cypress/bin/cypress" "$@"
|
|
17
|
+
fi
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
6
|
+
esac
|
|
7
|
+
|
|
8
|
+
if [ -z "$NODE_PATH" ]; then
|
|
9
|
+
export NODE_PATH="/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vite@2.7.13/node_modules/vite/bin/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vite@2.7.13/node_modules/vite/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vite@2.7.13/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules:/Users/haoqun/Developer/vuejs/node_modules:/Users/haoqun/Developer/node_modules:/Users/haoqun/node_modules:/Users/node_modules:/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/config/cypress-ct/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/config/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/node_modules"
|
|
10
|
+
else
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vite@2.7.13/node_modules/vite/bin/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vite@2.7.13/node_modules/vite/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vite@2.7.13/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules:/Users/haoqun/Developer/vuejs/node_modules:/Users/haoqun/Developer/node_modules:/Users/haoqun/node_modules:/Users/node_modules:/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/config/cypress-ct/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/config/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/node_modules"
|
|
12
|
+
fi
|
|
13
|
+
if [ -x "$basedir/node" ]; then
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vite@2.7.13/node_modules/vite/bin/vite.js" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/vite@2.7.13/node_modules/vite/bin/vite.js" "$@"
|
|
17
|
+
fi
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"scripts": {
|
|
3
|
+
"test:unit": "cypress open-ct",
|
|
4
|
+
"test:unit:ci": "cypress run-ct --quiet --reporter spec"
|
|
5
|
+
},
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"vue": "^3.2.29"
|
|
8
|
+
},
|
|
9
|
+
"devDependencies": {
|
|
10
|
+
"@cypress/vite-dev-server": "^2.2.2",
|
|
11
|
+
"@cypress/vue": "^3.1.0",
|
|
12
|
+
"cypress": "^9.4.1",
|
|
13
|
+
"vite": "^2.7.13"
|
|
14
|
+
}
|
|
15
|
+
}
|
package/template/{code/default → config/cypress-ct}/src/components/__tests__/HelloWorld.spec.js
RENAMED
|
File without changes
|
|
@@ -6,12 +6,12 @@ case `uname` in
|
|
|
6
6
|
esac
|
|
7
7
|
|
|
8
8
|
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/typescript@4.5.
|
|
9
|
+
export NODE_PATH="/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/typescript@4.5.5/node_modules/typescript/bin/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/typescript@4.5.5/node_modules/typescript/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/typescript@4.5.5/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules:/Users/haoqun/Developer/vuejs/node_modules:/Users/haoqun/Developer/node_modules:/Users/haoqun/node_modules:/Users/node_modules:/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/config/typescript/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/config/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/typescript@4.5.
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/typescript@4.5.5/node_modules/typescript/bin/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/typescript@4.5.5/node_modules/typescript/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/typescript@4.5.5/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules:/Users/haoqun/Developer/vuejs/node_modules:/Users/haoqun/Developer/node_modules:/Users/haoqun/node_modules:/Users/node_modules:/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/config/typescript/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/config/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/node_modules"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/typescript@4.5.
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/typescript@4.5.5/node_modules/typescript/bin/tsc" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/typescript@4.5.
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/typescript@4.5.5/node_modules/typescript/bin/tsc" "$@"
|
|
17
17
|
fi
|
|
@@ -6,12 +6,12 @@ case `uname` in
|
|
|
6
6
|
esac
|
|
7
7
|
|
|
8
8
|
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/typescript@4.5.
|
|
9
|
+
export NODE_PATH="/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/typescript@4.5.5/node_modules/typescript/bin/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/typescript@4.5.5/node_modules/typescript/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/typescript@4.5.5/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules:/Users/haoqun/Developer/vuejs/node_modules:/Users/haoqun/Developer/node_modules:/Users/haoqun/node_modules:/Users/node_modules:/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/config/typescript/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/config/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/typescript@4.5.
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/typescript@4.5.5/node_modules/typescript/bin/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/typescript@4.5.5/node_modules/typescript/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/typescript@4.5.5/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules:/Users/haoqun/Developer/vuejs/node_modules:/Users/haoqun/Developer/node_modules:/Users/haoqun/node_modules:/Users/node_modules:/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/config/typescript/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/config/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/node_modules"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/typescript@4.5.
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/typescript@4.5.5/node_modules/typescript/bin/tsserver" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/typescript@4.5.
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/typescript@4.5.5/node_modules/typescript/bin/tsserver" "$@"
|
|
17
17
|
fi
|
|
@@ -6,12 +6,12 @@ case `uname` in
|
|
|
6
6
|
esac
|
|
7
7
|
|
|
8
8
|
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vue-tsc@0.
|
|
9
|
+
export NODE_PATH="/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vue-tsc@0.31.1_typescript@4.5.5/node_modules/vue-tsc/bin/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vue-tsc@0.31.1_typescript@4.5.5/node_modules/vue-tsc/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vue-tsc@0.31.1_typescript@4.5.5/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules:/Users/haoqun/Developer/vuejs/node_modules:/Users/haoqun/Developer/node_modules:/Users/haoqun/node_modules:/Users/node_modules:/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/config/typescript/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/config/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vue-tsc@0.
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vue-tsc@0.31.1_typescript@4.5.5/node_modules/vue-tsc/bin/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vue-tsc@0.31.1_typescript@4.5.5/node_modules/vue-tsc/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vue-tsc@0.31.1_typescript@4.5.5/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules:/Users/haoqun/Developer/vuejs/node_modules:/Users/haoqun/Developer/node_modules:/Users/haoqun/node_modules:/Users/node_modules:/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/config/typescript/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/config/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/node_modules"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vue-tsc@0.
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vue-tsc@0.31.1_typescript@4.5.5/node_modules/vue-tsc/bin/vue-tsc.js" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/vue-tsc@0.
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/vue-tsc@0.31.1_typescript@4.5.5/node_modules/vue-tsc/bin/vue-tsc.js" "$@"
|
|
17
17
|
fi
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"baseUrl": "./",
|
|
4
3
|
"target": "esnext",
|
|
5
4
|
"useDefineForClassFields": true,
|
|
6
5
|
"module": "esnext",
|
|
@@ -12,7 +11,7 @@
|
|
|
12
11
|
"resolveJsonModule": true,
|
|
13
12
|
"esModuleInterop": true,
|
|
14
13
|
"paths": {
|
|
15
|
-
"@/*": ["src/*"]
|
|
14
|
+
"@/*": ["./src/*"]
|
|
16
15
|
},
|
|
17
16
|
"lib": ["esnext", "dom", "dom.iterable", "scripthost"],
|
|
18
17
|
"skipLibCheck": true
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
6
|
+
esac
|
|
7
|
+
|
|
8
|
+
if [ -z "$NODE_PATH" ]; then
|
|
9
|
+
export NODE_PATH="/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vitest@0.2.6_jsdom@19.0.0/node_modules/vitest/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vitest@0.2.6_jsdom@19.0.0/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules:/Users/haoqun/Developer/vuejs/node_modules:/Users/haoqun/Developer/node_modules:/Users/haoqun/node_modules:/Users/node_modules:/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/config/vitest/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/config/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/node_modules"
|
|
10
|
+
else
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vitest@0.2.6_jsdom@19.0.0/node_modules/vitest/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vitest@0.2.6_jsdom@19.0.0/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules:/Users/haoqun/Developer/vuejs/node_modules:/Users/haoqun/Developer/node_modules:/Users/haoqun/node_modules:/Users/node_modules:/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/config/vitest/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/config/node_modules:/Users/haoqun/Developer/vuejs/create-vue/template/node_modules"
|
|
12
|
+
fi
|
|
13
|
+
if [ -x "$basedir/node" ]; then
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vitest@0.2.6_jsdom@19.0.0/node_modules/vitest/vitest.mjs" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/vitest@0.2.6_jsdom@19.0.0/node_modules/vitest/vitest.mjs" "$@"
|
|
17
|
+
fi
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest'
|
|
2
|
+
|
|
3
|
+
import { mount } from '@vue/test-utils'
|
|
4
|
+
import HelloWorld from '../HelloWorld.vue'
|
|
5
|
+
|
|
6
|
+
describe('HelloWorld', () => {
|
|
7
|
+
it('renders properly', () => {
|
|
8
|
+
const wrapper = mount(HelloWorld, { props: { msg: 'Hello Vitest' } })
|
|
9
|
+
expect(wrapper.text()).toContain('Hello Vitest')
|
|
10
|
+
})
|
|
11
|
+
})
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "@vue/tsconfig/tsconfig.web.json",
|
|
3
|
+
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"baseUrl": ".",
|
|
6
|
+
"paths": {
|
|
7
|
+
"@/*": ["./src/*"]
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
"references": [
|
|
12
|
+
{
|
|
13
|
+
"path": "./tsconfig.vite-config.json"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "@vue/tsconfig/tsconfig.web.json",
|
|
3
|
+
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
|
|
4
|
+
"exclude": ["src/**/__tests__/*"],
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
"baseUrl": ".",
|
|
7
|
+
"paths": {
|
|
8
|
+
"@/*": ["./src/*"]
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
"references": [
|
|
13
|
+
{
|
|
14
|
+
"path": "./tsconfig.vite-config.json"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"path": "./tsconfig.vitest.json"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// https://docs.cypress.io/api/introduction/api.html
|
|
2
|
-
|
|
3
|
-
describe('My First Test', () => {
|
|
4
|
-
it('visits the app root url', () => {
|
|
5
|
-
cy.visit('/')
|
|
6
|
-
cy.contains('h1', 'You did it!')
|
|
7
|
-
})
|
|
8
|
-
|
|
9
|
-
it('navigates to the about page', () => {
|
|
10
|
-
cy.visit('/about')
|
|
11
|
-
cy.contains('h1', 'This is an about page')
|
|
12
|
-
})
|
|
13
|
-
})
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { mount } from '@cypress/vue'
|
|
2
|
-
import HelloWorld from '../HelloWorld.vue'
|
|
3
|
-
|
|
4
|
-
describe('HelloWorld', () => {
|
|
5
|
-
it('playground', () => {
|
|
6
|
-
mount(HelloWorld, { props: { msg: 'Hello Cypress' } })
|
|
7
|
-
})
|
|
8
|
-
|
|
9
|
-
it('renders properly', () => {
|
|
10
|
-
mount(HelloWorld, { props: { msg: 'Hello Cypress' } })
|
|
11
|
-
cy.get('h1').should('contain', 'Hello Cypress')
|
|
12
|
-
})
|
|
13
|
-
})
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { mount } from '@cypress/vue'
|
|
2
|
-
import HelloWorld from '../HelloWorld.vue'
|
|
3
|
-
|
|
4
|
-
describe('HelloWorld', () => {
|
|
5
|
-
it('playground', () => {
|
|
6
|
-
mount(HelloWorld, { props: { msg: 'Hello Cypress' } })
|
|
7
|
-
})
|
|
8
|
-
|
|
9
|
-
it('renders properly', () => {
|
|
10
|
-
mount(HelloWorld, { props: { msg: 'Hello Cypress' } })
|
|
11
|
-
cy.get('h1').should('contain', 'Hello Cypress')
|
|
12
|
-
})
|
|
13
|
-
})
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// https://docs.cypress.io/api/introduction/api.html
|
|
2
|
-
|
|
3
|
-
describe('My First Test', () => {
|
|
4
|
-
it('visits the app root url', () => {
|
|
5
|
-
cy.visit('/')
|
|
6
|
-
cy.contains('h1', 'You did it!')
|
|
7
|
-
})
|
|
8
|
-
|
|
9
|
-
it('navigates to the about page', () => {
|
|
10
|
-
cy.visit('/about')
|
|
11
|
-
cy.contains('h1', 'This is an about page')
|
|
12
|
-
})
|
|
13
|
-
})
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { mount } from '@cypress/vue'
|
|
2
|
-
import HelloWorld from '../HelloWorld.vue'
|
|
3
|
-
|
|
4
|
-
describe('HelloWorld', () => {
|
|
5
|
-
it('playground', () => {
|
|
6
|
-
mount(HelloWorld, { props: { msg: 'Hello Cypress' } })
|
|
7
|
-
})
|
|
8
|
-
|
|
9
|
-
it('renders properly', () => {
|
|
10
|
-
mount(HelloWorld, { props: { msg: 'Hello Cypress' } })
|
|
11
|
-
cy.get('h1').should('contain', 'Hello Cypress')
|
|
12
|
-
})
|
|
13
|
-
})
|