nil-build
继承webpack的构建工具
Last updated 2 years ago by bplok20010 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install nil-build 
SYNC missed versions from official npm registry.

nil-build

继承webpack的构建工具

安装

全局安装

npm install nil-build -g

或 局部安装

npm install nil-build --save-dev

使用

//package.json
{
    "scripts": {
        "start": "nil-build dev",
        "build": "nil-build prod", 
        "watch": "nil-build watch", 
    }
}

npm start

nil.build.config.js默认配置

module.exports = (env, resolveApp) = > {
    appPath: resolveApp('.'),
    appDist: resolveApp(env === 'node' ? 'lib' : 'dist'), //打包生成目录
    appPolyfills: require.resolve('./polyfills.js'), 
    appEntryHtml: resolveApp('src/index.html'), // 项目首页html
    appEntryJs: resolveApp('src/index.js'), // 默认入口脚本
    appSrc: resolveApp('src'),
    appNodeModules: resolveApp('node_modules'),
    publicUrl: undefined,
    enableESlint: false, //启用eslint
    webpack: { //webpack扩展配置
        //... 
    }
}

.eslintrc.json 自定义eslint规则

{
    "rules": {
        //...
    }   
}

.babelrc babel扩展

{
    "presets": [...]
    "plugins": {
        //...
    }   
}

Current Tags

  • 1.3.1                                ...           latest (2 years ago)

16 Versions

  • 1.3.1                                ...           2 years ago
  • 1.3.0                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.6                                ...           2 years ago
  • 1.1.5                                ...           2 years ago
  • 1.1.4                                ...           2 years ago
  • 1.1.3                                ...           2 years ago
  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.4                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (59)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |