create-vue 2.0.6 → 2.1.1
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 +498 -2942
- package/package.json +15 -10
- package/template/base/.vscode/extensions.json +1 -1
- package/template/base/node_modules/.bin/vite +17 -0
- package/template/base/package.json +5 -10
- package/template/{code/default → base}/src/assets/base.css +0 -0
- package/template/{code/default → base}/src/assets/logo.svg +0 -0
- package/template/base/src/assets/main.css +35 -0
- package/template/base/vite.config.js +2 -11
- package/template/code/default/src/App.vue +5 -39
- package/template/code/default/src/components/icons/IconTooling.vue +0 -2
- package/template/code/router/src/App.vue +6 -40
- package/template/code/router/src/components/icons/IconTooling.vue +0 -2
- package/template/code/typescript-default/src/App.vue +5 -39
- package/template/code/typescript-default/src/components/icons/IconTooling.vue +0 -2
- package/template/code/typescript-router/src/App.vue +6 -40
- 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 +30 -0
- package/template/config/cypress-ct/cypress/support/component.ts +42 -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 +4 -8
- package/template/entry/pinia/src/main.js +6 -8
- package/template/entry/router/src/main.js +4 -7
- package/template/entry/router-and-pinia/src/main.js +6 -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/assets/base.css +0 -74
- package/template/code/router/src/assets/logo.svg +0 -1
- 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/assets/base.css +0 -74
- package/template/code/typescript-default/src/assets/logo.svg +0 -1
- package/template/code/typescript-router/cypress/integration/example.spec.ts +0 -13
- package/template/code/typescript-router/src/assets/base.css +0 -74
- package/template/code/typescript-router/src/assets/logo.svg +0 -1
- 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
|
@@ -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,30 @@
|
|
|
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 global styles
|
|
23
|
+
import '@/assets/main.css'
|
|
24
|
+
|
|
25
|
+
import { mount } from 'cypress/vue2'
|
|
26
|
+
|
|
27
|
+
Cypress.Commands.add('mount', mount)
|
|
28
|
+
|
|
29
|
+
// Example use:
|
|
30
|
+
// cy.mount(MyComponent)
|
|
@@ -0,0 +1,42 @@
|
|
|
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 global styles
|
|
23
|
+
import '@/assets/main.css'
|
|
24
|
+
|
|
25
|
+
import { mount } from 'cypress/vue2'
|
|
26
|
+
|
|
27
|
+
// Augment the Cypress namespace to include type definitions for
|
|
28
|
+
// your custom command.
|
|
29
|
+
// Alternatively, can be defined in cypress/support/component.d.ts
|
|
30
|
+
// with a <reference path="./component" /> at the top of your spec.
|
|
31
|
+
declare global {
|
|
32
|
+
namespace Cypress {
|
|
33
|
+
interface Chainable {
|
|
34
|
+
mount: typeof mount
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
Cypress.Commands.add('mount', mount)
|
|
40
|
+
|
|
41
|
+
// Example use:
|
|
42
|
+
// 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
|
|
@@ -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/tsserver" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/typescript@4.7.4/node_modules/typescript/bin/tsserver" "$@"
|
|
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/vue-tsc@0.38.4_typescript@4.7.4/node_modules/vue-tsc/bin/vue-tsc.js" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/vue-tsc@0.38.4_typescript@4.7.4/node_modules/vue-tsc/bin/vue-tsc.js" "$@"
|
|
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.43",
|
|
9
|
+
"npm-run-all": "^4.1.5",
|
|
10
|
+
"typescript": "~4.7.4",
|
|
11
|
+
"vue-tsc": "^0.38.4"
|
|
10
12
|
}
|
|
11
13
|
}
|
|
@@ -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/vitest@0.18.0_jsdom@20.0.0/node_modules/vitest/vitest.mjs" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/vitest@0.18.0_jsdom@20.0.0/node_modules/vitest/vitest.mjs" "$@"
|
|
17
|
+
fi
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"scripts": {
|
|
3
|
+
"test:unit": "vitest --environment jsdom"
|
|
4
|
+
},
|
|
5
|
+
"dependencies": {
|
|
6
|
+
"vue": "^2.7.4"
|
|
7
|
+
},
|
|
8
|
+
"devDependencies": {
|
|
9
|
+
"@vue/test-utils": "^1.3.0",
|
|
10
|
+
"jsdom": "^20.0.0",
|
|
11
|
+
"vitest": "^0.18.0",
|
|
12
|
+
"vue-template-compiler": "^2.7.4"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -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, { propsData: { msg: 'Hello Vitest' } })
|
|
9
|
+
expect(wrapper.text()).toContain('Hello Vitest')
|
|
10
|
+
})
|
|
11
|
+
})
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import Vue from 'vue'
|
|
2
|
-
import VueCompositionAPI, { createApp, h } from '@vue/composition-api'
|
|
3
|
-
|
|
4
2
|
import App from './App.vue'
|
|
5
3
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const app = createApp({
|
|
9
|
-
render: () => h(App)
|
|
10
|
-
})
|
|
4
|
+
import './assets/main.css'
|
|
11
5
|
|
|
12
|
-
|
|
6
|
+
new Vue({
|
|
7
|
+
render: (h) => h(App)
|
|
8
|
+
}).$mount('#app')
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import Vue from 'vue'
|
|
2
|
-
import VueCompositionAPI, { createApp, h } from '@vue/composition-api'
|
|
3
2
|
import { createPinia, PiniaVuePlugin } from 'pinia'
|
|
4
3
|
|
|
5
4
|
import App from './App.vue'
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
import './assets/main.css'
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
pinia: createPinia(),
|
|
11
|
-
render: () => h(App)
|
|
12
|
-
})
|
|
13
|
-
app.use(PiniaVuePlugin)
|
|
8
|
+
Vue.use(PiniaVuePlugin)
|
|
14
9
|
|
|
15
|
-
|
|
10
|
+
new Vue({
|
|
11
|
+
pinia: createPinia(),
|
|
12
|
+
render: (h) => h(App)
|
|
13
|
+
}).$mount('#app')
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import Vue from 'vue'
|
|
2
|
-
import VueCompositionAPI, { createApp, h } from '@vue/composition-api'
|
|
3
2
|
|
|
4
3
|
import App from './App.vue'
|
|
5
4
|
import router from './router'
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
import './assets/main.css'
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
new Vue({
|
|
10
9
|
router,
|
|
11
|
-
render: () => h(App)
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
app.mount('#app')
|
|
10
|
+
render: (h) => h(App)
|
|
11
|
+
}).$mount('#app')
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import Vue from 'vue'
|
|
2
|
-
import VueCompositionAPI, { createApp, h } from '@vue/composition-api'
|
|
3
2
|
import { createPinia, PiniaVuePlugin } from 'pinia'
|
|
4
3
|
|
|
5
4
|
import App from './App.vue'
|
|
6
5
|
import router from './router'
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
import './assets/main.css'
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
Vue.use(PiniaVuePlugin)
|
|
10
|
+
|
|
11
|
+
new Vue({
|
|
11
12
|
router,
|
|
12
13
|
pinia: createPinia(),
|
|
13
|
-
render: () => h(App)
|
|
14
|
-
})
|
|
15
|
-
app.use(PiniaVuePlugin)
|
|
16
|
-
|
|
17
|
-
app.mount('#app')
|
|
14
|
+
render: (h) => h(App)
|
|
15
|
+
}).$mount('#app')
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"devDependencies": {
|
|
3
|
+
"@rushstack/eslint-patch": "^1.1.0",
|
|
4
|
+
"@vue/eslint-config-prettier": "^7.0.0",
|
|
5
|
+
"@vue/eslint-config-typescript": "^11.0.0",
|
|
6
|
+
"eslint": "^8.5.0",
|
|
7
|
+
"eslint-plugin-cypress": "^2.12.1",
|
|
8
|
+
"eslint-plugin-vue": "^9.0.0",
|
|
9
|
+
"prettier": "^2.5.1"
|
|
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.config.json"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|