vue-entry

3.0.10 • Public • Published

vue-entry Build Status npm package

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 = require('vue-entry');
 
module.exports = {
   entry: vueEntry({
   src: './src',
   autoImportVueComponent: true
   }),
}

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

  1. 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/
        └── ...
    
  2. 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

  1. standalone config file

  2. standalone i18n file

  3. standalone vuex file

  4. log method($debug and $error) for vue component object

Readme

Keywords

none

Package Sidebar

Install

npm i vue-entry

Weekly Downloads

2

Version

3.0.10

License

ISC

Unpacked Size

80.5 kB

Total Files

24

Last publish

Collaborators

  • askliujun