vue-entry
An entry boot for Vue2 projects. auto generate entry Object for webpack config entry option.
Installation
npm install vue-entry --save-dev
Example Webpack Config
var vueEntry = ;moduleexports =entry:
Options and defaults (Optional)
"src": './src' // An relative path for the source. Default: './src'. normally include pages and components folders in it. "autoImportVueComponent": true // vue component import and registered to Vue globally. "langs": "zh_CN" // export in .i18n.js file "vueLibBuildIn":true // include vue.js, vue-router.js, vue-resource.js, vue-i18n.js. if setting false, using script tag for global use manually. "rootFontSize":16 // designer width / 10
Application architecture
-
single app in one project
src/ ├── components/ ├── page1/ │ ├── page1.i18n.js // i18n file optional │ ├── pag1.vue // page file *required │ └──page1.state.js // state file optional ├── index.html // *required ├── routes.js // optional ├── config.json // optional ├── service.js // optional └── ... └── statics/ ├── images/ └── ...
-
multi app in one project
src/ ├── components/ ├── apps/ │ ├── app1 │ │ ├── index.html │ │ ├── routes.js │ │ ├── config.json │ │ └── ... │ ├── app2 │ │ ├── index.html │ │ ├── routes.js │ │ ├── config.json │ │ └── ... │ └── ... └── statics/ ├── images/ └── ...
extra tools for app development
-
standalone config file
-
standalone i18n file
-
standalone vuex file
-
log method($debug and $error) for vue component object