Installation
Install package with NPM and add it to your development dependencies:
npm install --save-dev nui-concat
Usage
var nuiconcat = ; gulp;
Information
插件会匹配页面中的Nui.load(入口模块, callback),将所有的依赖模块合并,并在入口模块同目录生成“入口模块-debug.js”
Options
参数 | 类型 | 说明 |
---|---|---|
paths | Object {别名:路径,别名:路径,..} | 路径别名,和Nui.config中的paths对应,若别名中存在base,则其它别名路径都会被重新设置为base路径+别名路径 |
alias | Object {别名:路径,别名:路径,..} | 模块别名,和Nui.config中的alias对应,值中可以通过{别名}访问paths中的别名路径 |
ignore | Array [模块名,模块名,..] | 忽略模块不会被添加到合并文件中,默认值['util', 'template', 'component'],这三个模块已经在nui.js中添加了 |