first commit
This commit is contained in:
21
app_vue/node_modules/@vue/cli-plugin-vuex/LICENSE
generated
vendored
Normal file
21
app_vue/node_modules/@vue/cli-plugin-vuex/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017-present, Yuxi (Evan) You
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
9
app_vue/node_modules/@vue/cli-plugin-vuex/README.md
generated
vendored
Normal file
9
app_vue/node_modules/@vue/cli-plugin-vuex/README.md
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
# @vue/cli-plugin-vuex
|
||||
|
||||
> vuex plugin for vue-cli
|
||||
|
||||
## Installing in an Already Created Project
|
||||
|
||||
```bash
|
||||
vue add vuex
|
||||
```
|
29
app_vue/node_modules/@vue/cli-plugin-vuex/generator/index.js
generated
vendored
Normal file
29
app_vue/node_modules/@vue/cli-plugin-vuex/generator/index.js
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
module.exports = (api, options = {}, rootOptions = {}) => {
|
||||
api.injectImports(api.entryFile, `import store from './store'`)
|
||||
|
||||
if (rootOptions.vueVersion === '3') {
|
||||
api.transformScript(api.entryFile, require('./injectUseStore'))
|
||||
api.extendPackage({
|
||||
dependencies: {
|
||||
vuex: '^4.0.0'
|
||||
}
|
||||
})
|
||||
api.render('./template-vue3', {})
|
||||
} else {
|
||||
api.injectRootOptions(api.entryFile, `store`)
|
||||
|
||||
api.extendPackage({
|
||||
dependencies: {
|
||||
vuex: '^3.6.2'
|
||||
}
|
||||
})
|
||||
|
||||
api.render('./template', {})
|
||||
}
|
||||
|
||||
if (api.invoking && api.hasPlugin('typescript')) {
|
||||
/* eslint-disable-next-line node/no-extraneous-require */
|
||||
const convertFiles = require('@vue/cli-plugin-typescript/generator/convert')
|
||||
convertFiles(api)
|
||||
}
|
||||
}
|
29
app_vue/node_modules/@vue/cli-plugin-vuex/generator/injectUseStore.js
generated
vendored
Normal file
29
app_vue/node_modules/@vue/cli-plugin-vuex/generator/injectUseStore.js
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
module.exports = (file, api) => {
|
||||
const j = api.jscodeshift
|
||||
const root = j(file.source)
|
||||
|
||||
const appRoots = root.find(j.CallExpression, (node) => {
|
||||
if (j.Identifier.check(node.callee) && node.callee.name === 'createApp') {
|
||||
return true
|
||||
}
|
||||
|
||||
if (
|
||||
j.MemberExpression.check(node.callee) &&
|
||||
j.Identifier.check(node.callee.object) &&
|
||||
node.callee.object.name === 'Vue' &&
|
||||
j.Identifier.check(node.callee.property) &&
|
||||
node.callee.property.name === 'createApp'
|
||||
) {
|
||||
return true
|
||||
}
|
||||
})
|
||||
|
||||
appRoots.replaceWith(({ node: createAppCall }) => {
|
||||
return j.callExpression(
|
||||
j.memberExpression(createAppCall, j.identifier('use')),
|
||||
[j.identifier('store')]
|
||||
)
|
||||
})
|
||||
|
||||
return root.toSource()
|
||||
}
|
14
app_vue/node_modules/@vue/cli-plugin-vuex/generator/template-vue3/src/store/index.js
generated
vendored
Normal file
14
app_vue/node_modules/@vue/cli-plugin-vuex/generator/template-vue3/src/store/index.js
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
import { createStore } from 'vuex'
|
||||
|
||||
export default createStore({
|
||||
state: {
|
||||
},
|
||||
getters: {
|
||||
},
|
||||
mutations: {
|
||||
},
|
||||
actions: {
|
||||
},
|
||||
modules: {
|
||||
}
|
||||
})
|
17
app_vue/node_modules/@vue/cli-plugin-vuex/generator/template/src/store/index.js
generated
vendored
Normal file
17
app_vue/node_modules/@vue/cli-plugin-vuex/generator/template/src/store/index.js
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
|
||||
Vue.use(Vuex)
|
||||
|
||||
export default new Vuex.Store({
|
||||
state: {
|
||||
},
|
||||
getters: {
|
||||
},
|
||||
mutations: {
|
||||
},
|
||||
actions: {
|
||||
},
|
||||
modules: {
|
||||
}
|
||||
})
|
1
app_vue/node_modules/@vue/cli-plugin-vuex/index.js
generated
vendored
Normal file
1
app_vue/node_modules/@vue/cli-plugin-vuex/index.js
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
module.exports = (api, options = {}) => {}
|
32
app_vue/node_modules/@vue/cli-plugin-vuex/package.json
generated
vendored
Normal file
32
app_vue/node_modules/@vue/cli-plugin-vuex/package.json
generated
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "@vue/cli-plugin-vuex",
|
||||
"version": "5.0.8",
|
||||
"description": "Vuex plugin for vue-cli",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/vuejs/vue-cli.git",
|
||||
"directory": "packages/@vue/cli-plugin-vuex"
|
||||
},
|
||||
"keywords": [
|
||||
"vue",
|
||||
"cli",
|
||||
"vuex"
|
||||
],
|
||||
"author": "Evan You",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/vuejs/vue-cli/issues"
|
||||
},
|
||||
"homepage": "https://github.com/vuejs/vue-cli/tree/dev/packages/@vue/cli-plugin-vuex#readme",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-test-utils": "^5.0.8"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@vue/cli-service": "^3.0.0 || ^4.0.0 || ^5.0.0-0"
|
||||
},
|
||||
"gitHead": "b154dbd7aca4b4538e6c483b1d4b817499d7b8eb"
|
||||
}
|
Reference in New Issue
Block a user