nv build 是啥?
是一款专门构建电商首页的脚手架工具,区别于其他脚手架工具:webpack/gulp/rollup/grunt等,职责单一,命令简要,更主要是可以进行二次开发
nv build快速使用
$ npm install nv.cli -g
安装完毕后,检验是否成功
$ nv
常用命令
Usage: nv <Command> <Options>
Command:
build :build project to view
publish :publish your project to server by ftp
clean :remove version folder
Options:
<build options> <isPrd>
--html build html on config input and output
--js build and babel on config input and output, you can use es6
--sass build sass to css, clean css, autoprefixer and so on
--sprite sprite many pngs to one png and sass
<isPrd>
-p : product mode,include:compress html,css,js and remove other config
-d : (default) expanded html,css,js and add other config
e.g:
nv build --html : build template to html by debug mode
nv build --sass -p : build sass to css by product mode