create-vue 3.1.12 → 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/outfile.cjs +6 -3
- package/package.json +1 -1
- 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 +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 +2 -2
- package/template/config/cypress-ct/package.json +3 -6
- package/template/config/cypress-ct/src/components/__tests__/{HelloWorld.spec.js → HelloWorld.cy.js} +2 -3
- 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/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/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;
|
|
@@ -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
|
@@ -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
|
|
@@ -11,7 +11,7 @@ else
|
|
|
11
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,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"scripts": {
|
|
3
|
-
"test:e2e": "start-server-and-test preview http://127.0.0.1:4173/ 'cypress open'",
|
|
4
|
-
"test:e2e:ci": "start-server-and-test preview http://127.0.0.1:4173/ 'cypress run'"
|
|
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
|
+
})
|
|
@@ -11,7 +11,7 @@ else
|
|
|
11
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
7
|
"vue": "^3.2.36"
|
|
8
8
|
},
|
|
9
9
|
"devDependencies": {
|
|
10
|
-
"
|
|
11
|
-
"@cypress/vue": "^3.1.2",
|
|
12
|
-
"cypress": "^9.7.0",
|
|
13
|
-
"vite": "^2.9.9"
|
|
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
|
})
|
|
@@ -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/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/vite@2.9.9/node_modules/vite/bin/vite.js" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/vite@2.9.9/node_modules/vite/bin/vite.js" "$@"
|
|
17
|
-
fi
|