create-vue 3.1.10 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -2
- package/outfile.cjs +8 -5
- package/package.json +7 -8
- package/template/base/.vscode/extensions.json +1 -1
- package/template/base/node_modules/.bin/vite +4 -4
- package/template/base/package.json +4 -4
- package/template/code/default/src/components/TheWelcome.vue +1 -1
- package/template/code/router/src/components/TheWelcome.vue +1 -1
- package/template/code/typescript-default/src/components/TheWelcome.vue +1 -1
- package/template/code/typescript-router/src/components/TheWelcome.vue +1 -1
- package/template/config/cypress/cypress/{integration/example.spec.js → e2e/example.cy.js} +0 -0
- package/template/config/cypress/cypress/{jsconfig.json → e2e/jsconfig.json} +1 -1
- package/template/config/cypress/cypress/support/commands.ts +37 -0
- package/template/config/cypress/cypress/support/{index.js → e2e.js} +0 -0
- package/template/config/cypress/cypress.config.js +8 -0
- package/template/config/cypress/cypress.config.ts +8 -0
- package/template/config/cypress/node_modules/.bin/cypress +4 -4
- package/template/config/cypress/node_modules/.bin/server-test +2 -2
- package/template/config/cypress/node_modules/.bin/start-server-and-test +2 -2
- package/template/config/cypress/node_modules/.bin/start-test +2 -2
- package/template/config/cypress/package.json +3 -3
- package/template/config/cypress-ct/cypress/support/component-index.html +12 -0
- package/template/config/cypress-ct/cypress/support/component.js +27 -0
- package/template/config/cypress-ct/cypress/support/component.ts +39 -0
- package/template/config/cypress-ct/cypress.config.js +15 -0
- package/template/config/cypress-ct/cypress.config.ts +15 -0
- package/template/config/cypress-ct/node_modules/.bin/cypress +4 -4
- package/template/config/cypress-ct/package.json +4 -7
- package/template/config/cypress-ct/src/components/__tests__/{HelloWorld.spec.js → HelloWorld.cy.js} +2 -3
- package/template/config/pinia/package.json +2 -2
- package/template/config/router/package.json +2 -2
- package/template/config/typescript/node_modules/.bin/npm-run-all +17 -0
- package/template/config/typescript/node_modules/.bin/run-p +17 -0
- package/template/config/typescript/node_modules/.bin/run-s +17 -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 +7 -5
- package/template/config/vitest/node_modules/.bin/vitest +4 -4
- package/template/config/vitest/package.json +3 -3
- package/template/config/vuex/package.json +1 -1
- package/template/tsconfig/base/{tsconfig.vite-config.json → tsconfig.config.json} +1 -1
- package/template/tsconfig/base/tsconfig.json +1 -1
- package/template/tsconfig/cypress/cypress/{tsconfig.json → e2e/tsconfig.json} +1 -1
- package/template/tsconfig/cypress-ct/tsconfig.cypress-ct.json +2 -2
- package/template/tsconfig/cypress-ct/tsconfig.json +1 -1
- package/template/tsconfig/vitest/package.json +1 -1
- package/template/tsconfig/vitest/tsconfig.json +1 -1
- package/template/config/cypress/cypress/plugins/index.js +0 -24
- package/template/config/cypress/cypress/plugins/index.ts +0 -19
- package/template/config/cypress/cypress.json +0 -3
- package/template/config/cypress-ct/cypress/plugins/index.js +0 -29
- package/template/config/cypress-ct/cypress/plugins/index.ts +0 -24
- package/template/config/cypress-ct/cypress.json +0 -7
- package/template/config/cypress-ct/node_modules/.bin/vite +0 -17
- package/template/tsconfig/cypress/cypress/plugins/tsconfig.json +0 -9
- package/template/tsconfig/vitest/tsconfig.vite-config.json +0 -8
package/README.md
CHANGED
package/outfile.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
/*! create-vue v3.
|
|
2
|
+
/*! create-vue v3.2.0 | MIT */
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -5464,7 +5464,7 @@ var sfcTypeSupportDoc = [
|
|
|
5464
5464
|
"",
|
|
5465
5465
|
"## Type Support for `.vue` Imports in TS",
|
|
5466
5466
|
"",
|
|
5467
|
-
"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=
|
|
5467
|
+
"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=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.",
|
|
5468
5468
|
"",
|
|
5469
5469
|
"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:",
|
|
5470
5470
|
"",
|
|
@@ -5489,7 +5489,7 @@ This template should help get you started developing with Vue 3 in Vite.
|
|
|
5489
5489
|
|
|
5490
5490
|
## Recommended IDE Setup
|
|
5491
5491
|
|
|
5492
|
-
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=
|
|
5492
|
+
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
|
|
5493
5493
|
${needsTypeScript ? sfcTypeSupportDoc : ""}
|
|
5494
5494
|
## Customize configuration
|
|
5495
5495
|
|
|
@@ -5525,7 +5525,7 @@ ${getCommand(packageManager, "test:unit")}
|
|
|
5525
5525
|
}
|
|
5526
5526
|
if (needsCypressCT) {
|
|
5527
5527
|
npmScriptsDescriptions += `
|
|
5528
|
-
### Run
|
|
5528
|
+
### Run Headed Component Tests with [Cypress Component Testing](https://on.cypress.io/component)
|
|
5529
5529
|
|
|
5530
5530
|
\`\`\`sh
|
|
5531
5531
|
${getCommand(packageManager, "test:unit")} # or \`${getCommand(packageManager, "test:unit:ci")}\` for headless testing
|
|
@@ -5603,7 +5603,7 @@ function configureEslint({ language, styleGuide, needsPrettier, needsCypress, ne
|
|
|
5603
5603
|
if (needsCypress) {
|
|
5604
5604
|
const cypressOverrides = [
|
|
5605
5605
|
{
|
|
5606
|
-
files: needsCypressCT ? ["**/__tests__/*.spec.{js,ts,jsx,tsx}", "cypress/
|
|
5606
|
+
files: needsCypressCT ? ["**/__tests__/*.{cy,spec}.{js,ts,jsx,tsx}", "cypress/e2e/**.{cy,spec}.{js,ts,jsx,tsx}"] : ["cypress/e2e/**.{cy,spec}.{js,ts,jsx,tsx}"],
|
|
5607
5607
|
extends: ["plugin:cypress/recommended"]
|
|
5608
5608
|
}
|
|
5609
5609
|
];
|
|
@@ -5848,6 +5848,9 @@ Scaffolding project in ${root}...`);
|
|
|
5848
5848
|
if (needsCypress) {
|
|
5849
5849
|
render("tsconfig/cypress");
|
|
5850
5850
|
}
|
|
5851
|
+
if (needsCypressCT) {
|
|
5852
|
+
render("tsconfig/cypress-ct");
|
|
5853
|
+
}
|
|
5851
5854
|
if (needsVitest) {
|
|
5852
5855
|
render("tsconfig/vitest");
|
|
5853
5856
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-vue",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "An easy way to start a Vue project",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"template"
|
|
12
12
|
],
|
|
13
13
|
"engines": {
|
|
14
|
-
"node": "^14.
|
|
14
|
+
"node": "^14.16.0 || >=16.0.0"
|
|
15
15
|
},
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/vuejs/create-vue#readme",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@types/eslint": "^8.4.
|
|
28
|
+
"@types/eslint": "^8.4.2",
|
|
29
29
|
"@types/prompts": "^2.0.14",
|
|
30
30
|
"@vue/tsconfig": "^0.1.3",
|
|
31
|
-
"esbuild": "^0.14.
|
|
31
|
+
"esbuild": "^0.14.42",
|
|
32
32
|
"esbuild-plugin-license": "^1.2.2",
|
|
33
|
-
"husky": "^
|
|
33
|
+
"husky": "^8.0.1",
|
|
34
34
|
"kolorist": "^1.5.1",
|
|
35
|
-
"lint-staged": "^12.3
|
|
35
|
+
"lint-staged": "^12.4.3",
|
|
36
36
|
"minimist": "^1.2.6",
|
|
37
37
|
"npm-run-all": "^4.1.5",
|
|
38
38
|
"prettier": "^2.6.2",
|
|
@@ -50,6 +50,5 @@
|
|
|
50
50
|
"snapshot": "zx ./scripts/snapshot.mjs",
|
|
51
51
|
"pretest": "run-s build snapshot",
|
|
52
52
|
"test": "zx ./scripts/test.mjs"
|
|
53
|
-
}
|
|
54
|
-
"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\nNote that the version number (`@3` or `@2`) MUST NOT be omitted, otherwise `npm` may resolve to a cached and outdated version of the package.\n"
|
|
53
|
+
}
|
|
55
54
|
}
|
|
@@ -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/
|
|
9
|
+
export NODE_PATH="/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/vite@2.9.
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/vite@2.9.9/node_modules/vite/bin/vite.js" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir/../../../../node_modules/.pnpm/vite@2.9.
|
|
16
|
+
exec node "$basedir/../../../../node_modules/.pnpm/vite@2.9.9/node_modules/vite/bin/vite.js" "$@"
|
|
17
17
|
fi
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
"scripts": {
|
|
3
3
|
"dev": "vite",
|
|
4
4
|
"build": "vite build",
|
|
5
|
-
"preview": "vite preview --port
|
|
5
|
+
"preview": "vite preview --port 4173"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"vue": "^3.2.
|
|
8
|
+
"vue": "^3.2.36"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
|
-
"@vitejs/plugin-vue": "^2.3.
|
|
12
|
-
"vite": "^2.9.
|
|
11
|
+
"@vitejs/plugin-vue": "^2.3.3",
|
|
12
|
+
"vite": "^2.9.9"
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -31,7 +31,7 @@ import SupportIcon from './icons/IconSupport.vue'
|
|
|
31
31
|
<a href="https://github.com/johnsoncodehk/volar" target="_blank">Volar</a>. If you need to test
|
|
32
32
|
your components and web pages, check out
|
|
33
33
|
<a href="https://www.cypress.io/" target="_blank">Cypress</a> and
|
|
34
|
-
<a href="https://
|
|
34
|
+
<a href="https://on.cypress.io/component" target="_blank"
|
|
35
35
|
>Cypress Component Testing</a
|
|
36
36
|
>.
|
|
37
37
|
|
|
@@ -31,7 +31,7 @@ import SupportIcon from './icons/IconSupport.vue'
|
|
|
31
31
|
<a href="https://github.com/johnsoncodehk/volar" target="_blank">Volar</a>. If you need to test
|
|
32
32
|
your components and web pages, check out
|
|
33
33
|
<a href="https://www.cypress.io/" target="_blank">Cypress</a> and
|
|
34
|
-
<a href="https://
|
|
34
|
+
<a href="https://on.cypress.io/component" target="_blank"
|
|
35
35
|
>Cypress Component Testing</a
|
|
36
36
|
>.
|
|
37
37
|
|
|
@@ -31,7 +31,7 @@ import SupportIcon from './icons/IconSupport.vue'
|
|
|
31
31
|
<a href="https://github.com/johnsoncodehk/volar" target="_blank">Volar</a>. If you need to test
|
|
32
32
|
your components and web pages, check out
|
|
33
33
|
<a href="https://www.cypress.io/" target="_blank">Cypress</a> and
|
|
34
|
-
<a href="https://
|
|
34
|
+
<a href="https://on.cypress.io/component" target="_blank"
|
|
35
35
|
>Cypress Component Testing</a
|
|
36
36
|
>.
|
|
37
37
|
|
|
@@ -31,7 +31,7 @@ import SupportIcon from './icons/IconSupport.vue'
|
|
|
31
31
|
<a href="https://github.com/johnsoncodehk/volar" target="_blank">Volar</a>. If you need to test
|
|
32
32
|
your components and web pages, check out
|
|
33
33
|
<a href="https://www.cypress.io/" target="_blank">Cypress</a> and
|
|
34
|
-
<a href="https://
|
|
34
|
+
<a href="https://on.cypress.io/component" target="_blank"
|
|
35
35
|
>Cypress Component Testing</a
|
|
36
36
|
>.
|
|
37
37
|
|
|
File without changes
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/// <reference types="cypress" />
|
|
2
|
+
// ***********************************************
|
|
3
|
+
// This example commands.ts shows you how to
|
|
4
|
+
// create various custom commands and overwrite
|
|
5
|
+
// existing commands.
|
|
6
|
+
//
|
|
7
|
+
// For more comprehensive examples of custom
|
|
8
|
+
// commands please read more here:
|
|
9
|
+
// https://on.cypress.io/custom-commands
|
|
10
|
+
// ***********************************************
|
|
11
|
+
//
|
|
12
|
+
//
|
|
13
|
+
// -- This is a parent command --
|
|
14
|
+
// Cypress.Commands.add('login', (email, password) => { ... })
|
|
15
|
+
//
|
|
16
|
+
//
|
|
17
|
+
// -- This is a child command --
|
|
18
|
+
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
|
|
19
|
+
//
|
|
20
|
+
//
|
|
21
|
+
// -- This is a dual command --
|
|
22
|
+
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
|
|
23
|
+
//
|
|
24
|
+
//
|
|
25
|
+
// -- This will overwrite an existing command --
|
|
26
|
+
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
|
27
|
+
//
|
|
28
|
+
// declare global {
|
|
29
|
+
// namespace Cypress {
|
|
30
|
+
// interface Chainable {
|
|
31
|
+
// login(email: string, password: string): Chainable<void>
|
|
32
|
+
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
|
33
|
+
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
|
34
|
+
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
|
|
35
|
+
// }
|
|
36
|
+
// }
|
|
37
|
+
// }
|
|
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/
|
|
9
|
+
export NODE_PATH="/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/cypress@
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/cypress@10.0.2/node_modules/cypress/bin/cypress" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/cypress@
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/cypress@10.0.2/node_modules/cypress/bin/cypress" "$@"
|
|
17
17
|
fi
|
|
@@ -6,9 +6,9 @@ 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/
|
|
9
|
+
export NODE_PATH="/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
14
|
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/start-server-and-test@1.14.0/node_modules/start-server-and-test/src/bin/start.js" "$@"
|
|
@@ -6,9 +6,9 @@ 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/
|
|
9
|
+
export NODE_PATH="/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
14
|
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/start-server-and-test@1.14.0/node_modules/start-server-and-test/src/bin/start.js" "$@"
|
|
@@ -6,9 +6,9 @@ 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/
|
|
9
|
+
export NODE_PATH="/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
14
|
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/start-server-and-test@1.14.0/node_modules/start-server-and-test/src/bin/start.js" "$@"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"scripts": {
|
|
3
|
-
"test:e2e": "start-server-and-test preview http://127.0.0.1:
|
|
4
|
-
"test:e2e:ci": "start-server-and-test preview http://127.0.0.1:
|
|
3
|
+
"test:e2e": "start-server-and-test preview http://127.0.0.1:4173/ 'cypress open --e2e'",
|
|
4
|
+
"test:e2e:ci": "start-server-and-test preview http://127.0.0.1:4173/ 'cypress run --e2e'"
|
|
5
5
|
},
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"cypress": "^
|
|
7
|
+
"cypress": "^10.0.2",
|
|
8
8
|
"start-server-and-test": "^1.14.0"
|
|
9
9
|
}
|
|
10
10
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
7
|
+
<title>Components App</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div data-cy-root></div>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// ***********************************************************
|
|
2
|
+
// This example support/component.js is processed and
|
|
3
|
+
// loaded automatically before your test files.
|
|
4
|
+
//
|
|
5
|
+
// This is a great place to put global configuration and
|
|
6
|
+
// behavior that modifies Cypress.
|
|
7
|
+
//
|
|
8
|
+
// You can change the location of this file or turn off
|
|
9
|
+
// automatically serving support files with the
|
|
10
|
+
// 'supportFile' configuration option.
|
|
11
|
+
//
|
|
12
|
+
// You can read more here:
|
|
13
|
+
// https://on.cypress.io/configuration
|
|
14
|
+
// ***********************************************************
|
|
15
|
+
|
|
16
|
+
// Import commands.js using ES2015 syntax:
|
|
17
|
+
import './commands'
|
|
18
|
+
|
|
19
|
+
// Alternatively you can use CommonJS syntax:
|
|
20
|
+
// require('./commands')
|
|
21
|
+
|
|
22
|
+
import { mount } from 'cypress/vue'
|
|
23
|
+
|
|
24
|
+
Cypress.Commands.add('mount', mount)
|
|
25
|
+
|
|
26
|
+
// Example use:
|
|
27
|
+
// cy.mount(MyComponent)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// ***********************************************************
|
|
2
|
+
// This example support/component.ts is processed and
|
|
3
|
+
// loaded automatically before your test files.
|
|
4
|
+
//
|
|
5
|
+
// This is a great place to put global configuration and
|
|
6
|
+
// behavior that modifies Cypress.
|
|
7
|
+
//
|
|
8
|
+
// You can change the location of this file or turn off
|
|
9
|
+
// automatically serving support files with the
|
|
10
|
+
// 'supportFile' configuration option.
|
|
11
|
+
//
|
|
12
|
+
// You can read more here:
|
|
13
|
+
// https://on.cypress.io/configuration
|
|
14
|
+
// ***********************************************************
|
|
15
|
+
|
|
16
|
+
// Import commands.js using ES2015 syntax:
|
|
17
|
+
import './commands'
|
|
18
|
+
|
|
19
|
+
// Alternatively you can use CommonJS syntax:
|
|
20
|
+
// require('./commands')
|
|
21
|
+
|
|
22
|
+
import { mount } from 'cypress/vue'
|
|
23
|
+
|
|
24
|
+
// Augment the Cypress namespace to include type definitions for
|
|
25
|
+
// your custom command.
|
|
26
|
+
// Alternatively, can be defined in cypress/support/component.d.ts
|
|
27
|
+
// with a <reference path="./component" /> at the top of your spec.
|
|
28
|
+
declare global {
|
|
29
|
+
namespace Cypress {
|
|
30
|
+
interface Chainable {
|
|
31
|
+
mount: typeof mount
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
Cypress.Commands.add('mount', mount)
|
|
37
|
+
|
|
38
|
+
// Example use:
|
|
39
|
+
// cy.mount(MyComponent)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const { defineConfig } = require('cypress')
|
|
2
|
+
|
|
3
|
+
module.exports = defineConfig({
|
|
4
|
+
e2e: {
|
|
5
|
+
specPattern: 'cypress/e2e/**/*.{cy,spec}.{js,jsx,ts,tsx}',
|
|
6
|
+
baseUrl: 'http://localhost:4173'
|
|
7
|
+
},
|
|
8
|
+
component: {
|
|
9
|
+
specPattern: 'src/**/__tests__/*.{cy,spec}.{js,ts,jsx,tsx}',
|
|
10
|
+
devServer: {
|
|
11
|
+
framework: 'vue',
|
|
12
|
+
bundler: 'vite'
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
})
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { defineConfig } from 'cypress'
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
e2e: {
|
|
5
|
+
specPattern: 'cypress/e2e/**/*.{cy,spec}.{js,jsx,ts,tsx}',
|
|
6
|
+
baseUrl: 'http://localhost:4173'
|
|
7
|
+
},
|
|
8
|
+
component: {
|
|
9
|
+
specPattern: 'src/**/__tests__/*.{cy,spec}.{js,ts,jsx,tsx}',
|
|
10
|
+
devServer: {
|
|
11
|
+
framework: 'vue',
|
|
12
|
+
bundler: 'vite'
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
})
|
|
@@ -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/
|
|
9
|
+
export NODE_PATH="/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/cypress@
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/cypress@10.0.2/node_modules/cypress/bin/cypress" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/cypress@
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/cypress@10.0.2/node_modules/cypress/bin/cypress" "$@"
|
|
17
17
|
fi
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"scripts": {
|
|
3
|
-
"test:unit": "cypress open
|
|
4
|
-
"test:unit:ci": "cypress run
|
|
3
|
+
"test:unit": "cypress open --component",
|
|
4
|
+
"test:unit:ci": "cypress run --component --quiet --reporter spec"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"vue": "^3.2.
|
|
7
|
+
"vue": "^3.2.36"
|
|
8
8
|
},
|
|
9
9
|
"devDependencies": {
|
|
10
|
-
"
|
|
11
|
-
"@cypress/vue": "^3.1.1",
|
|
12
|
-
"cypress": "^9.5.4",
|
|
13
|
-
"vite": "^2.9.5"
|
|
10
|
+
"cypress": "^10.0.2"
|
|
14
11
|
}
|
|
15
12
|
}
|
package/template/config/cypress-ct/src/components/__tests__/{HelloWorld.spec.js → HelloWorld.cy.js}
RENAMED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { mount } from '@cypress/vue'
|
|
2
1
|
import HelloWorld from '../HelloWorld.vue'
|
|
3
2
|
|
|
4
3
|
describe('HelloWorld', () => {
|
|
5
4
|
it('playground', () => {
|
|
6
|
-
mount(HelloWorld, { props: { msg: 'Hello Cypress' } })
|
|
5
|
+
cy.mount(HelloWorld, { props: { msg: 'Hello Cypress' } })
|
|
7
6
|
})
|
|
8
7
|
|
|
9
8
|
it('renders properly', () => {
|
|
10
|
-
mount(HelloWorld, { props: { msg: 'Hello Cypress' } })
|
|
9
|
+
cy.mount(HelloWorld, { props: { msg: 'Hello Cypress' } })
|
|
11
10
|
cy.get('h1').should('contain', 'Hello Cypress')
|
|
12
11
|
})
|
|
13
12
|
})
|
|
@@ -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/node_modules"
|
|
10
|
+
else
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
12
|
+
fi
|
|
13
|
+
if [ -x "$basedir/node" ]; then
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/npm-run-all@4.1.5/node_modules/npm-run-all/bin/npm-run-all/index.js" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/npm-run-all@4.1.5/node_modules/npm-run-all/bin/npm-run-all/index.js" "$@"
|
|
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/node_modules"
|
|
10
|
+
else
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
12
|
+
fi
|
|
13
|
+
if [ -x "$basedir/node" ]; then
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/npm-run-all@4.1.5/node_modules/npm-run-all/bin/run-p/index.js" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/npm-run-all@4.1.5/node_modules/npm-run-all/bin/run-p/index.js" "$@"
|
|
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/node_modules"
|
|
10
|
+
else
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
12
|
+
fi
|
|
13
|
+
if [ -x "$basedir/node" ]; then
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/npm-run-all@4.1.5/node_modules/npm-run-all/bin/run-s/index.js" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/npm-run-all@4.1.5/node_modules/npm-run-all/bin/run-s/index.js" "$@"
|
|
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/
|
|
9
|
+
export NODE_PATH="/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/typescript@4.
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/typescript@4.7.2/node_modules/typescript/bin/tsc" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/typescript@4.
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/typescript@4.7.2/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/
|
|
9
|
+
export NODE_PATH="/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/typescript@4.
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/typescript@4.7.2/node_modules/typescript/bin/tsserver" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/typescript@4.
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/typescript@4.7.2/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/
|
|
9
|
+
export NODE_PATH="/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/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.35.2_typescript@4.7.2/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.35.2_typescript@4.7.2/node_modules/vue-tsc/bin/vue-tsc.js" "$@"
|
|
17
17
|
fi
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"scripts": {
|
|
3
|
-
"build": "
|
|
4
|
-
"
|
|
3
|
+
"build": "run-p type-check build-only",
|
|
4
|
+
"build-only": "vite build",
|
|
5
|
+
"type-check": "vue-tsc --noEmit"
|
|
5
6
|
},
|
|
6
7
|
"devDependencies": {
|
|
7
|
-
"@types/node": "^16.11.
|
|
8
|
-
"
|
|
9
|
-
"
|
|
8
|
+
"@types/node": "^16.11.36",
|
|
9
|
+
"npm-run-all": "^4.1.5",
|
|
10
|
+
"typescript": "~4.7.2",
|
|
11
|
+
"vue-tsc": "^0.35.2"
|
|
10
12
|
}
|
|
11
13
|
}
|
|
@@ -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/
|
|
9
|
+
export NODE_PATH="/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/node_modules"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vitest@0.
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vitest@0.13.0_jsdom@19.0.0/node_modules/vitest/vitest.mjs" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/vitest@0.
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/vitest@0.13.0_jsdom@19.0.0/node_modules/vitest/vitest.mjs" "$@"
|
|
17
17
|
fi
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
"test:unit": "vitest --environment jsdom"
|
|
4
4
|
},
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"vue": "^3.2.
|
|
6
|
+
"vue": "^3.2.36"
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
|
-
"@vue/test-utils": "^2.0.0
|
|
9
|
+
"@vue/test-utils": "^2.0.0",
|
|
10
10
|
"jsdom": "^19.0.0",
|
|
11
|
-
"vitest": "^0.
|
|
11
|
+
"vitest": "^0.13.0"
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
/**
|
|
17
|
-
* @type {Cypress.PluginConfig}
|
|
18
|
-
*/
|
|
19
|
-
// eslint-disable-next-line no-unused-vars
|
|
20
|
-
module.exports = (on, config) => {
|
|
21
|
-
// `on` is used to hook into various events Cypress emits
|
|
22
|
-
// `config` is the resolved Cypress config
|
|
23
|
-
return config
|
|
24
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
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
|
|
@@ -1,29 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
import { startDevServer } from '@cypress/vite-dev-server'
|
|
16
|
-
|
|
17
|
-
export default ((on, config) => {
|
|
18
|
-
// `on` is used to hook into various events Cypress emits
|
|
19
|
-
// `config` is the resolved Cypress config
|
|
20
|
-
on('dev-server:start', (options) => {
|
|
21
|
-
return startDevServer({ options })
|
|
22
|
-
})
|
|
23
|
-
return config
|
|
24
|
-
}) as Cypress.PluginConfig
|
|
@@ -1,17 +0,0 @@
|
|
|
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.9.5/node_modules/vite/bin/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vite@2.9.5/node_modules/vite/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vite@2.9.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/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.9.5/node_modules/vite/bin/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vite@2.9.5/node_modules/vite/node_modules:/Users/haoqun/Developer/vuejs/create-vue/node_modules/.pnpm/vite@2.9.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/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.9.5/node_modules/vite/bin/vite.js" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/vite@2.9.5/node_modules/vite/bin/vite.js" "$@"
|
|
17
|
-
fi
|