create-vue 2.0.5 → 2.1.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/LICENSE +153 -1
- package/outfile.cjs +338 -129
- package/package.json +16 -12
- package/template/base/node_modules/.bin/vite +17 -0
- package/template/base/package.json +5 -10
- package/template/base/vite.config.js +2 -11
- package/template/code/default/src/components/icons/IconTooling.vue +0 -2
- package/template/code/router/src/components/icons/IconTooling.vue +0 -2
- package/template/code/typescript-default/src/components/icons/IconTooling.vue +0 -2
- package/template/code/typescript-router/src/components/icons/IconTooling.vue +0 -2
- package/template/{code/default/cypress/integration/example.spec.js → config/cypress/cypress/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 +17 -0
- package/template/config/cypress/node_modules/.bin/server-test +17 -0
- package/template/config/cypress/node_modules/.bin/start-server-and-test +17 -0
- package/template/config/cypress/node_modules/.bin/start-test +17 -0
- package/template/config/cypress/package.json +3 -7
- 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 +17 -0
- package/template/config/cypress-ct/package.json +12 -0
- package/template/{code/typescript-default/src/components/__tests__/HelloWorld.spec.ts → config/cypress-ct/src/components/__tests__/HelloWorld.cy.js} +2 -3
- package/template/config/jsx/node_modules/.bin/vite +17 -0
- package/template/config/jsx/package.json +9 -0
- package/template/config/jsx/vite.config.js +23 -0
- package/template/config/pinia/package.json +2 -1
- package/template/config/router/package.json +1 -1
- package/template/config/typescript/env.d.ts +0 -1
- 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 +17 -0
- package/template/config/typescript/node_modules/.bin/tsserver +17 -0
- package/template/config/typescript/node_modules/.bin/vue-tsc +17 -0
- package/template/config/typescript/package.json +7 -5
- package/template/config/vitest/node_modules/.bin/vitest +17 -0
- package/template/config/vitest/package.json +14 -0
- package/template/config/vitest/src/components/__tests__/HelloWorld.spec.js +11 -0
- package/template/entry/default/src/main.js +3 -9
- package/template/entry/pinia/src/main.js +4 -8
- package/template/entry/router/src/main.js +3 -8
- package/template/entry/router-and-pinia/src/main.js +4 -8
- package/template/eslint/package.json +11 -0
- package/template/tsconfig/base/package.json +5 -0
- package/template/tsconfig/base/tsconfig.config.json +8 -0
- package/template/tsconfig/base/tsconfig.json +16 -0
- package/template/tsconfig/cypress/cypress/e2e/tsconfig.json +10 -0
- package/template/tsconfig/cypress-ct/tsconfig.app.json +12 -0
- package/template/tsconfig/cypress-ct/tsconfig.cypress-ct.json +8 -0
- package/template/tsconfig/cypress-ct/tsconfig.json +14 -0
- package/template/tsconfig/vitest/package.json +8 -0
- package/template/tsconfig/vitest/tsconfig.app.json +12 -0
- package/template/tsconfig/vitest/tsconfig.json +14 -0
- package/template/tsconfig/vitest/tsconfig.vitest.json +9 -0
- package/template/code/default/src/components/__tests__/HelloWorld.spec.js +0 -13
- 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-router/cypress/integration/example.spec.ts +0 -13
- package/template/code/typescript-router/src/components/__tests__/HelloWorld.spec.ts +0 -13
- package/template/config/cypress/cypress/plugins/index.js +0 -28
- package/template/config/cypress/cypress.json +0 -7
- package/template/config/typescript/tsconfig.json +0 -24
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-vue",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "An easy way to start a Vue project",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -25,14 +25,19 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/vuejs/create-vue#readme",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"
|
|
29
|
-
"
|
|
28
|
+
"@types/eslint": "^8.4.5",
|
|
29
|
+
"@types/prompts": "^2.0.14",
|
|
30
|
+
"@vue/tsconfig": "^0.1.3",
|
|
31
|
+
"esbuild": "^0.14.49",
|
|
32
|
+
"esbuild-plugin-license": "^1.2.2",
|
|
33
|
+
"husky": "^8.0.1",
|
|
30
34
|
"kolorist": "^1.5.1",
|
|
31
|
-
"lint-staged": "^
|
|
32
|
-
"minimist": "^1.2.
|
|
35
|
+
"lint-staged": "^13.0.3",
|
|
36
|
+
"minimist": "^1.2.6",
|
|
33
37
|
"npm-run-all": "^4.1.5",
|
|
34
|
-
"prettier": "^2.
|
|
35
|
-
"prompts": "^2.4.2"
|
|
38
|
+
"prettier": "^2.7.1",
|
|
39
|
+
"prompts": "^2.4.2",
|
|
40
|
+
"zx": "^4.3.0"
|
|
36
41
|
},
|
|
37
42
|
"lint-staged": {
|
|
38
43
|
"*.{js,ts,vue,json}": [
|
|
@@ -41,10 +46,9 @@
|
|
|
41
46
|
},
|
|
42
47
|
"scripts": {
|
|
43
48
|
"format": "prettier --write .",
|
|
44
|
-
"build": "
|
|
45
|
-
"snapshot": "
|
|
49
|
+
"build": "zx ./scripts/build.mjs",
|
|
50
|
+
"snapshot": "zx ./scripts/snapshot.mjs",
|
|
46
51
|
"pretest": "run-s build snapshot",
|
|
47
|
-
"test": "
|
|
48
|
-
}
|
|
49
|
-
"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@next\n```\n"
|
|
52
|
+
"test": "zx ./scripts/test.mjs"
|
|
53
|
+
}
|
|
50
54
|
}
|
|
@@ -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/vue-2-scaffolder/node_modules/.pnpm/node_modules"
|
|
10
|
+
else
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/vue-2-scaffolder/node_modules/.pnpm/node_modules"
|
|
12
|
+
fi
|
|
13
|
+
if [ -x "$basedir/node" ]; then
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/vite@2.9.14/node_modules/vite/bin/vite.js" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../node_modules/.pnpm/vite@2.9.14/node_modules/vite/bin/vite.js" "$@"
|
|
17
|
+
fi
|
|
@@ -2,19 +2,14 @@
|
|
|
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
|
-
"
|
|
9
|
-
"vue": "^2.6.14"
|
|
8
|
+
"vue": "^2.7.4"
|
|
10
9
|
},
|
|
11
10
|
"devDependencies": {
|
|
12
|
-
"@vitejs/plugin-legacy": "^1.
|
|
13
|
-
"@
|
|
14
|
-
"
|
|
15
|
-
"vite": "^2.8.4",
|
|
16
|
-
"vite-plugin-vue2": "^1.9.3",
|
|
17
|
-
"vue-template-babel-compiler": "^1.2.0",
|
|
18
|
-
"vue-template-compiler": "^2.6.14"
|
|
11
|
+
"@vitejs/plugin-legacy": "^1.8.2",
|
|
12
|
+
"@vitejs/plugin-vue2": "^1.1.2",
|
|
13
|
+
"vite": "^2.9.14"
|
|
19
14
|
}
|
|
20
15
|
}
|
|
@@ -2,21 +2,12 @@ import { fileURLToPath } from 'url'
|
|
|
2
2
|
|
|
3
3
|
import { defineConfig } from 'vite'
|
|
4
4
|
import legacy from '@vitejs/plugin-legacy'
|
|
5
|
-
import
|
|
6
|
-
// @ts-ignore
|
|
7
|
-
import vueTemplateBabelCompiler from 'vue-template-babel-compiler'
|
|
8
|
-
import scriptSetup from 'unplugin-vue2-script-setup/vite'
|
|
5
|
+
import vue2 from '@vitejs/plugin-vue2'
|
|
9
6
|
|
|
10
7
|
// https://vitejs.dev/config/
|
|
11
8
|
export default defineConfig({
|
|
12
9
|
plugins: [
|
|
13
|
-
vue2(
|
|
14
|
-
jsx: true,
|
|
15
|
-
vueTemplateOptions: {
|
|
16
|
-
compiler: vueTemplateBabelCompiler
|
|
17
|
-
}
|
|
18
|
-
}),
|
|
19
|
-
scriptSetup(),
|
|
10
|
+
vue2(),
|
|
20
11
|
legacy({
|
|
21
12
|
targets: ['ie >= 11'],
|
|
22
13
|
additionalLegacyPolyfills: ['regenerator-runtime/runtime']
|
|
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
|
|
@@ -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/vue-2-scaffolder/node_modules/.pnpm/node_modules"
|
|
10
|
+
else
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/vue-2-scaffolder/node_modules/.pnpm/node_modules"
|
|
12
|
+
fi
|
|
13
|
+
if [ -x "$basedir/node" ]; then
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/cypress@10.3.0/node_modules/cypress/bin/cypress" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/cypress@10.3.0/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/vue-2-scaffolder/node_modules/.pnpm/node_modules"
|
|
10
|
+
else
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/vue-2-scaffolder/node_modules/.pnpm/node_modules"
|
|
12
|
+
fi
|
|
13
|
+
if [ -x "$basedir/node" ]; then
|
|
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" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/start-server-and-test@1.14.0/node_modules/start-server-and-test/src/bin/start.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/vue-2-scaffolder/node_modules/.pnpm/node_modules"
|
|
10
|
+
else
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/vue-2-scaffolder/node_modules/.pnpm/node_modules"
|
|
12
|
+
fi
|
|
13
|
+
if [ -x "$basedir/node" ]; then
|
|
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" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/start-server-and-test@1.14.0/node_modules/start-server-and-test/src/bin/start.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/vue-2-scaffolder/node_modules/.pnpm/node_modules"
|
|
10
|
+
else
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/vue-2-scaffolder/node_modules/.pnpm/node_modules"
|
|
12
|
+
fi
|
|
13
|
+
if [ -x "$basedir/node" ]; then
|
|
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" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/start-server-and-test@1.14.0/node_modules/start-server-and-test/src/bin/start.js" "$@"
|
|
17
|
+
fi
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"scripts": {
|
|
3
|
-
"test:
|
|
4
|
-
"test:
|
|
5
|
-
"test:e2e": "start-server-and-test preview http://127.0.0.1:5050/ 'cypress open'",
|
|
6
|
-
"test:e2e:ci": "start-server-and-test preview http://127.0.0.1:5050/ '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'"
|
|
7
5
|
},
|
|
8
6
|
"devDependencies": {
|
|
9
|
-
"
|
|
10
|
-
"@cypress/vue": "^2.2.4",
|
|
11
|
-
"cypress": "^9.5.0",
|
|
7
|
+
"cypress": "^10.3.0",
|
|
12
8
|
"start-server-and-test": "^1.14.0"
|
|
13
9
|
}
|
|
14
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/vue2'
|
|
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/vue2'
|
|
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
|
+
})
|
|
@@ -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/vue-2-scaffolder/node_modules/.pnpm/node_modules"
|
|
10
|
+
else
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/vue-2-scaffolder/node_modules/.pnpm/node_modules"
|
|
12
|
+
fi
|
|
13
|
+
if [ -x "$basedir/node" ]; then
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/cypress@10.3.0/node_modules/cypress/bin/cypress" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/cypress@10.3.0/node_modules/cypress/bin/cypress" "$@"
|
|
17
|
+
fi
|
|
@@ -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, { propsData: { msg: 'Hello Cypress' } })
|
|
5
|
+
cy.mount(HelloWorld, { propsData: { msg: 'Hello Cypress' } })
|
|
7
6
|
})
|
|
8
7
|
|
|
9
8
|
it('renders properly', () => {
|
|
10
|
-
mount(HelloWorld, { propsData: { msg: 'Hello Cypress' } })
|
|
9
|
+
cy.mount(HelloWorld, { propsData: { 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/vue-2-scaffolder/node_modules/.pnpm/node_modules"
|
|
10
|
+
else
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/vue-2-scaffolder/node_modules/.pnpm/node_modules"
|
|
12
|
+
fi
|
|
13
|
+
if [ -x "$basedir/node" ]; then
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vite@2.9.14/node_modules/vite/bin/vite.js" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/vite@2.9.14/node_modules/vite/bin/vite.js" "$@"
|
|
17
|
+
fi
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { fileURLToPath } from 'url'
|
|
2
|
+
|
|
3
|
+
import { defineConfig } from 'vite'
|
|
4
|
+
import legacy from '@vitejs/plugin-legacy'
|
|
5
|
+
import vue2 from '@vitejs/plugin-vue2'
|
|
6
|
+
import vue2Jsx from '@vitejs/plugin-vue2-jsx'
|
|
7
|
+
|
|
8
|
+
// https://vitejs.dev/config/
|
|
9
|
+
export default defineConfig({
|
|
10
|
+
plugins: [
|
|
11
|
+
vue2(),
|
|
12
|
+
vue2Jsx(),
|
|
13
|
+
legacy({
|
|
14
|
+
targets: ['ie >= 11'],
|
|
15
|
+
additionalLegacyPolyfills: ['regenerator-runtime/runtime']
|
|
16
|
+
})
|
|
17
|
+
],
|
|
18
|
+
resolve: {
|
|
19
|
+
alias: {
|
|
20
|
+
'@': fileURLToPath(new URL('./src', import.meta.url))
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
})
|
|
@@ -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/vue-2-scaffolder/node_modules/.pnpm/node_modules"
|
|
10
|
+
else
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/vue-2-scaffolder/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/vue-2-scaffolder/node_modules/.pnpm/node_modules"
|
|
10
|
+
else
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/vue-2-scaffolder/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/vue-2-scaffolder/node_modules/.pnpm/node_modules"
|
|
10
|
+
else
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/vue-2-scaffolder/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
|
|
@@ -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/vue-2-scaffolder/node_modules/.pnpm/node_modules"
|
|
10
|
+
else
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/Users/haoqun/Developer/vuejs/vue-2-scaffolder/node_modules/.pnpm/node_modules"
|
|
12
|
+
fi
|
|
13
|
+
if [ -x "$basedir/node" ]; then
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/bin/tsc" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/bin/tsc" "$@"
|
|
17
|
+
fi
|