0.0.4 • Published 6 years ago

vue-multiple-cli v0.0.4

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

a simple cli for vue multiple page app

Installation

$ npm install vue-multiple-cli -g
# OR
$ yarn global add vue-multiple-cli

Create a project:

$ vum create my-project
$ cd my-project
$ npm start or yarn start

Create a page template:

$ vum page my-page

page template

all the template: https://github.com/zhangchao828/vum-page-boilerplate.git

you can also create 'template' directory in you project root,then create some page template in the directory

but all the template name must be start with 'page-'

update project config

$ vum update

vue.config.js

//default options
module.exports={
  //if you want to run all pages,you should set: page:'*'
  page:['example'],
  port:3000,
  sourceMap: true,
  //http-proxy-middleware
  proxy: {},
  publicPath: '../',
  //px2rem:{ remUnit: 37.5 }
  px2rem: null
}

webpack.config.js

you can create a webpack.config.js to merge the default webpack config

//webpack.config.js
module.exports=function(defaultWebpackConfig,NODE_ENV){
  //NODE_ENV is 'production' or 'development'
  return {
    //you webpack config
  }
}

postcss.config.js

you can create a postcss.config.js to add new postcss plugins

//postcss.config.js
module.exports=function(defaultPostcssPlugin,NODE_ENV){
  return [
    //you postcss plugins
  ]
}

babel.config.js

you can create a babel.config.js to merge the default babel config

//babel.config.js
module.exports=function(defaultBabelConfig){
  return {
    //you babel options
  }
}