create-vue 3.0.6 → 3.1.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/LICENSE +153 -1
- package/outfile.cjs +112 -42
- package/package.json +7 -6
- package/template/base/.vscode/extensions.json +1 -1
- package/template/base/_gitignore +1 -0
- package/template/base/node_modules/.bin/vite +4 -4
- package/template/base/package.json +2 -2
- 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/env.d.ts +0 -7
- 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 +1 -1
- 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.2 | 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
|
|
@@ -5451,12 +5463,27 @@ function getCommand(packageManager, scriptName) {
|
|
|
5451
5463
|
}
|
|
5452
5464
|
|
|
5453
5465
|
// utils/generateReadme.js
|
|
5454
|
-
var sfcTypeSupportDoc =
|
|
5466
|
+
var sfcTypeSupportDoc = [
|
|
5467
|
+
"",
|
|
5468
|
+
"## Type Support for `.vue` Imports in TS",
|
|
5469
|
+
"",
|
|
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.",
|
|
5471
|
+
"",
|
|
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:",
|
|
5473
|
+
"",
|
|
5474
|
+
"1. Disable the built-in TypeScript Extension",
|
|
5475
|
+
" 1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette",
|
|
5476
|
+
" 2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`",
|
|
5477
|
+
"2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.",
|
|
5478
|
+
""
|
|
5479
|
+
].join("\n");
|
|
5455
5480
|
function generateReadme({
|
|
5456
5481
|
projectName,
|
|
5457
5482
|
packageManager,
|
|
5458
5483
|
needsTypeScript,
|
|
5459
|
-
|
|
5484
|
+
needsCypress,
|
|
5485
|
+
needsCypressCT,
|
|
5486
|
+
needsVitest,
|
|
5460
5487
|
needsEslint
|
|
5461
5488
|
}) {
|
|
5462
5489
|
let readme = `# ${projectName}
|
|
@@ -5465,7 +5492,7 @@ This template should help get you started developing with Vue 3 in Vite.
|
|
|
5465
5492
|
|
|
5466
5493
|
## Recommended IDE Setup
|
|
5467
5494
|
|
|
5468
|
-
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar) (and disable Vetur).
|
|
5495
|
+
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.vscode-typescript-vue-plugin).
|
|
5469
5496
|
${needsTypeScript ? sfcTypeSupportDoc : ""}
|
|
5470
5497
|
## Customize configuration
|
|
5471
5498
|
|
|
@@ -5490,14 +5517,26 @@ ${getCommand(packageManager, "dev")}
|
|
|
5490
5517
|
${getCommand(packageManager, "build")}
|
|
5491
5518
|
\`\`\`
|
|
5492
5519
|
`;
|
|
5493
|
-
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) {
|
|
5494
5530
|
npmScriptsDescriptions += `
|
|
5495
5531
|
### Run Unit Tests with [Cypress Component Testing](https://docs.cypress.io/guides/component-testing/introduction)
|
|
5496
5532
|
|
|
5497
5533
|
\`\`\`sh
|
|
5498
5534
|
${getCommand(packageManager, "test:unit")} # or \`${getCommand(packageManager, "test:unit:ci")}\` for headless testing
|
|
5499
5535
|
\`\`\`
|
|
5500
|
-
|
|
5536
|
+
`;
|
|
5537
|
+
}
|
|
5538
|
+
if (needsCypress) {
|
|
5539
|
+
npmScriptsDescriptions += `
|
|
5501
5540
|
### Run End-to-End Tests with [Cypress](https://www.cypress.io/)
|
|
5502
5541
|
|
|
5503
5542
|
\`\`\`sh
|
|
@@ -5548,13 +5587,7 @@ var config = {
|
|
|
5548
5587
|
"vue/setup-compiler-macros": true
|
|
5549
5588
|
}
|
|
5550
5589
|
};
|
|
5551
|
-
|
|
5552
|
-
{
|
|
5553
|
-
files: ["**/__tests__/*.spec.{js,ts,jsx,tsx}", "cypress/integration/**.spec.{js,ts,jsx,tsx}"],
|
|
5554
|
-
extends: ["plugin:cypress/recommended"]
|
|
5555
|
-
}
|
|
5556
|
-
];
|
|
5557
|
-
function configureEslint({ language, styleGuide, needsPrettier, needsCypress }) {
|
|
5590
|
+
function configureEslint({ language, styleGuide, needsPrettier, needsCypress, needsCypressCT }) {
|
|
5558
5591
|
switch (`${styleGuide}-${language}`) {
|
|
5559
5592
|
case "default-javascript":
|
|
5560
5593
|
config.extends.push("eslint:recommended");
|
|
@@ -5571,6 +5604,12 @@ function configureEslint({ language, styleGuide, needsPrettier, needsCypress })
|
|
|
5571
5604
|
config.extends.push("@vue/eslint-config-prettier");
|
|
5572
5605
|
}
|
|
5573
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
|
+
];
|
|
5574
5613
|
addEslintDependency("eslint-plugin-cypress");
|
|
5575
5614
|
config.overrides = cypressOverrides;
|
|
5576
5615
|
}
|
|
@@ -5588,12 +5627,13 @@ function configureEslint({ language, styleGuide, needsPrettier, needsCypress })
|
|
|
5588
5627
|
configuration
|
|
5589
5628
|
};
|
|
5590
5629
|
}
|
|
5591
|
-
function renderEslint(rootDir, { needsTypeScript,
|
|
5630
|
+
function renderEslint(rootDir, { needsTypeScript, needsCypress, needsCypressCT, needsPrettier }) {
|
|
5592
5631
|
const { dependencies: dependencies2, configuration } = configureEslint({
|
|
5593
5632
|
language: needsTypeScript ? "typescript" : "javascript",
|
|
5594
5633
|
styleGuide: "default",
|
|
5595
5634
|
needsPrettier,
|
|
5596
|
-
needsCypress
|
|
5635
|
+
needsCypress,
|
|
5636
|
+
needsCypressCT
|
|
5597
5637
|
});
|
|
5598
5638
|
const packageJsonPath = import_path3.default.resolve(rootDir, "package.json");
|
|
5599
5639
|
const existingPkg = JSON.parse(import_fs4.default.readFileSync(packageJsonPath));
|
|
@@ -5623,6 +5663,9 @@ function canSafelyOverwrite(dir) {
|
|
|
5623
5663
|
return !import_fs5.default.existsSync(dir) || import_fs5.default.readdirSync(dir).length === 0;
|
|
5624
5664
|
}
|
|
5625
5665
|
function emptyDir(dir) {
|
|
5666
|
+
if (!import_fs5.default.existsSync(dir)) {
|
|
5667
|
+
return;
|
|
5668
|
+
}
|
|
5626
5669
|
postOrderDirectoryTraverse(dir, (dir2) => import_fs5.default.rmdirSync(dir2), (file) => import_fs5.default.unlinkSync(file));
|
|
5627
5670
|
}
|
|
5628
5671
|
async function init() {
|
|
@@ -5633,12 +5676,12 @@ ${banner_default}
|
|
|
5633
5676
|
const argv = (0, import_minimist.default)(process.argv.slice(2), {
|
|
5634
5677
|
alias: {
|
|
5635
5678
|
typescript: ["ts"],
|
|
5636
|
-
"with-tests": ["tests"
|
|
5679
|
+
"with-tests": ["tests"],
|
|
5637
5680
|
router: ["vue-router"]
|
|
5638
5681
|
},
|
|
5639
5682
|
boolean: true
|
|
5640
5683
|
});
|
|
5641
|
-
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";
|
|
5642
5685
|
let targetDir = argv._[0];
|
|
5643
5686
|
const defaultProjectName = !targetDir ? "vue-project" : targetDir;
|
|
5644
5687
|
const forceOverwrite = argv.force;
|
|
@@ -5709,9 +5752,17 @@ ${banner_default}
|
|
|
5709
5752
|
inactive: "No"
|
|
5710
5753
|
},
|
|
5711
5754
|
{
|
|
5712
|
-
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",
|
|
5713
5764
|
type: () => isFeatureFlagsUsed ? null : "toggle",
|
|
5714
|
-
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?",
|
|
5715
5766
|
initial: false,
|
|
5716
5767
|
active: "Yes",
|
|
5717
5768
|
inactive: "No"
|
|
@@ -5747,18 +5798,21 @@ ${banner_default}
|
|
|
5747
5798
|
process.exit(1);
|
|
5748
5799
|
}
|
|
5749
5800
|
const {
|
|
5750
|
-
|
|
5751
|
-
|
|
5801
|
+
projectName,
|
|
5802
|
+
packageName = projectName,
|
|
5803
|
+
shouldOverwrite = argv.force,
|
|
5752
5804
|
needsJsx = argv.jsx,
|
|
5753
5805
|
needsTypeScript = argv.typescript,
|
|
5754
5806
|
needsRouter = argv.router,
|
|
5755
5807
|
needsPinia = argv.pinia,
|
|
5756
|
-
|
|
5808
|
+
needsCypress = argv.cypress || argv.tests,
|
|
5809
|
+
needsVitest = argv.vitest || argv.tests,
|
|
5757
5810
|
needsEslint = argv.eslint || argv["eslint-with-prettier"],
|
|
5758
5811
|
needsPrettier = argv["eslint-with-prettier"]
|
|
5759
5812
|
} = result;
|
|
5813
|
+
const needsCypressCT = needsCypress && !needsVitest;
|
|
5760
5814
|
const root = import_path4.default.join(cwd, targetDir);
|
|
5761
|
-
if (shouldOverwrite) {
|
|
5815
|
+
if (import_fs5.default.existsSync(root) && shouldOverwrite) {
|
|
5762
5816
|
emptyDir(root);
|
|
5763
5817
|
} else if (!import_fs5.default.existsSync(root)) {
|
|
5764
5818
|
import_fs5.default.mkdirSync(root);
|
|
@@ -5782,14 +5836,27 @@ Scaffolding project in ${root}...`);
|
|
|
5782
5836
|
if (needsPinia) {
|
|
5783
5837
|
render("config/pinia");
|
|
5784
5838
|
}
|
|
5785
|
-
if (
|
|
5839
|
+
if (needsVitest) {
|
|
5840
|
+
render("config/vitest");
|
|
5841
|
+
}
|
|
5842
|
+
if (needsCypress) {
|
|
5786
5843
|
render("config/cypress");
|
|
5787
5844
|
}
|
|
5845
|
+
if (needsCypressCT) {
|
|
5846
|
+
render("config/cypress-ct");
|
|
5847
|
+
}
|
|
5788
5848
|
if (needsTypeScript) {
|
|
5789
5849
|
render("config/typescript");
|
|
5850
|
+
render("tsconfig/base");
|
|
5851
|
+
if (needsCypress) {
|
|
5852
|
+
render("tsconfig/cypress");
|
|
5853
|
+
}
|
|
5854
|
+
if (needsVitest) {
|
|
5855
|
+
render("tsconfig/vitest");
|
|
5856
|
+
}
|
|
5790
5857
|
}
|
|
5791
5858
|
if (needsEslint) {
|
|
5792
|
-
renderEslint(root, { needsTypeScript,
|
|
5859
|
+
renderEslint(root, { needsTypeScript, needsCypress, needsCypressCT, needsPrettier });
|
|
5793
5860
|
}
|
|
5794
5861
|
const codeTemplate = (needsTypeScript ? "typescript-" : "") + (needsRouter ? "router" : "default");
|
|
5795
5862
|
render(`code/${codeTemplate}`);
|
|
@@ -5813,29 +5880,29 @@ Scaffolding project in ${root}...`);
|
|
|
5813
5880
|
import_fs5.default.renameSync(filepath, tsFilePath);
|
|
5814
5881
|
}
|
|
5815
5882
|
} else if (import_path4.default.basename(filepath) === "jsconfig.json") {
|
|
5816
|
-
import_fs5.default.
|
|
5883
|
+
import_fs5.default.unlinkSync(filepath);
|
|
5817
5884
|
}
|
|
5818
5885
|
});
|
|
5819
5886
|
const indexHtmlPath = import_path4.default.resolve(root, "index.html");
|
|
5820
5887
|
const indexHtmlContent = import_fs5.default.readFileSync(indexHtmlPath, "utf8");
|
|
5821
5888
|
import_fs5.default.writeFileSync(indexHtmlPath, indexHtmlContent.replace("src/main.js", "src/main.ts"));
|
|
5822
|
-
}
|
|
5823
|
-
|
|
5824
|
-
|
|
5825
|
-
|
|
5826
|
-
|
|
5827
|
-
|
|
5828
|
-
import_fs5.default.rmdirSync(dirpath);
|
|
5829
|
-
}
|
|
5830
|
-
}, () => {
|
|
5889
|
+
} else {
|
|
5890
|
+
preOrderDirectoryTraverse(root, () => {
|
|
5891
|
+
}, (filepath) => {
|
|
5892
|
+
if (filepath.endsWith(".ts")) {
|
|
5893
|
+
import_fs5.default.unlinkSync(filepath);
|
|
5894
|
+
}
|
|
5831
5895
|
});
|
|
5832
5896
|
}
|
|
5833
|
-
const
|
|
5897
|
+
const userAgent = process.env.npm_config_user_agent ?? "";
|
|
5898
|
+
const packageManager = /pnpm/.test(userAgent) ? "pnpm" : /yarn/.test(userAgent) ? "yarn" : "npm";
|
|
5834
5899
|
import_fs5.default.writeFileSync(import_path4.default.resolve(root, "README.md"), generateReadme({
|
|
5835
5900
|
projectName: result.projectName || defaultProjectName,
|
|
5836
5901
|
packageManager,
|
|
5837
5902
|
needsTypeScript,
|
|
5838
|
-
|
|
5903
|
+
needsVitest,
|
|
5904
|
+
needsCypress,
|
|
5905
|
+
needsCypressCT,
|
|
5839
5906
|
needsEslint
|
|
5840
5907
|
}));
|
|
5841
5908
|
console.log(`
|
|
@@ -5845,6 +5912,9 @@ Done. Now run:
|
|
|
5845
5912
|
console.log(` ${bold(green(`cd ${import_path4.default.relative(cwd, root)}`))}`);
|
|
5846
5913
|
}
|
|
5847
5914
|
console.log(` ${bold(green(getCommand(packageManager, "install")))}`);
|
|
5915
|
+
if (needsPrettier) {
|
|
5916
|
+
console.log(` ${bold(green(getCommand(packageManager, "lint")))}`);
|
|
5917
|
+
}
|
|
5848
5918
|
console.log(` ${bold(green(getCommand(packageManager, "dev")))}`);
|
|
5849
5919
|
console.log();
|
|
5850
5920
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-vue",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"description": "An easy way to start a Vue project",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -26,14 +26,15 @@
|
|
|
26
26
|
"homepage": "https://github.com/vuejs/create-vue#readme",
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"esbuild": "^0.13.15",
|
|
29
|
+
"esbuild-plugin-license": "^1.0.4",
|
|
29
30
|
"husky": "^7.0.4",
|
|
30
31
|
"kolorist": "^1.5.1",
|
|
31
|
-
"lint-staged": "^12.
|
|
32
|
+
"lint-staged": "^12.2.0",
|
|
32
33
|
"minimist": "^1.2.5",
|
|
33
34
|
"npm-run-all": "^4.1.5",
|
|
34
35
|
"prettier": "^2.5.1",
|
|
35
36
|
"prompts": "^2.4.2",
|
|
36
|
-
"zx": "^4.
|
|
37
|
+
"zx": "^4.3.0"
|
|
37
38
|
},
|
|
38
39
|
"lint-staged": {
|
|
39
40
|
"*.{js,ts,vue,json}": [
|
|
@@ -42,10 +43,10 @@
|
|
|
42
43
|
},
|
|
43
44
|
"scripts": {
|
|
44
45
|
"format": "prettier --write .",
|
|
45
|
-
"build": "
|
|
46
|
-
"snapshot": "
|
|
46
|
+
"build": "zx ./scripts/build.mjs",
|
|
47
|
+
"snapshot": "zx ./scripts/snapshot.mjs",
|
|
47
48
|
"pretest": "run-s build snapshot",
|
|
48
|
-
"test": "
|
|
49
|
+
"test": "zx ./scripts/test.mjs"
|
|
49
50
|
},
|
|
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"
|
|
51
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.3.1/node_modules/cypress/bin/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/cypress@9.3.1/node_modules/cypress/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/cypress@9.3.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.3.1/node_modules/cypress/bin/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/cypress@9.3.1/node_modules/cypress/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/cypress@9.3.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.3.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.3.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.3.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.3.1/node_modules/cypress/bin/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/cypress@9.3.1/node_modules/cypress/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/cypress@9.3.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.3.1/node_modules/cypress/bin/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/cypress@9.3.1/node_modules/cypress/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/cypress@9.3.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.3.1/node_modules/cypress/bin/cypress" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/cypress@9.3.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.27"
|
|
8
|
+
},
|
|
9
|
+
"devDependencies": {
|
|
10
|
+
"@cypress/vite-dev-server": "^2.2.2",
|
|
11
|
+
"@cypress/vue": "^3.1.0",
|
|
12
|
+
"cypress": "^9.3.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.29.8_typescript@4.5.
|
|
9
|
+
export NODE_PATH="/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vue-tsc@0.29.8_typescript@4.5.5/node_modules/vue-tsc/bin/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vue-tsc@0.29.8_typescript@4.5.5/node_modules/vue-tsc/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vue-tsc@0.29.8_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.29.8_typescript@4.5.
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vue-tsc@0.29.8_typescript@4.5.5/node_modules/vue-tsc/bin/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vue-tsc@0.29.8_typescript@4.5.5/node_modules/vue-tsc/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vue-tsc@0.29.8_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.29.8_typescript@4.5.
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vue-tsc@0.29.8_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.29.8_typescript@4.5.
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/vue-tsc@0.29.8_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.1.27_jsdom@19.0.0/node_modules/vitest/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vitest@0.1.27_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.1.27_jsdom@19.0.0/node_modules/vitest/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vitest@0.1.27_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.1.27_jsdom@19.0.0/node_modules/vitest/vitest.mjs" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/vitest@0.1.27_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
|
-
})
|