@nbfe/parce
前端构建工具
Last updated 5 months ago by shuoshubao .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @nbfe/parce 
SYNC missed versions from official npm registry.

Useage

  • mkdir your_project
  • cd your_project
  • yarn init -y
  • yarn add parce
  • npx parce init
  • npx parce dev
  • npx parce build

parce -h

Init

执行 init 操作之后, 会生成一个简易项目模板

├── project.config.js
└── src
    ├── common.js
    └── view
        └── index
            └── index.vue
  • project.config.js 项目配置文件
  • src/common.js 项目公用文件
  • src/view/**/index.vue 根据 index.vue 生成页面

project.config.js

module.exports = {
    port: 8080, // 端口号
    title: '', // 项目标题
    publicPath: '', // publicPath
    pathConfig: {
        src: 'src',
        common: 'src/common.js',
        view: 'src/view',
        injectWebpackConfig: ''
    },
    devServer: {},
    apiProxy: {},
    webpackProvide: {}, // webpack.ProvidePlugin
    loaders: [], // rules.loader
}

projectConfig. injectWebpackConfig

injectWebpackConfig: webpackConfig => {

    // console.log(webpackConfig)

    return webpackConfig
}

webpackAlias

src 的所有子目录

webpackAlias: {

}

webpack.ProvidePlugin

project.config.js

webpackProvide: {
    qs: 'qs',
    _: 'lodash'
}

.npmrc

registry=https://registry.npm.taobao.org
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/

.gitignore

.DS_Store
node_modules
npm-debug.log*
yarn-debug.log*
yarn-error.log*
package-lock.json

mark

Current Tags

  • 1.1.1                                ...           latest (5 months ago)

5 Versions

  • 1.1.1                                ...           5 months ago
  • 1.1.0                                ...           7 months ago
  • 1.0.2                                ...           7 months ago
  • 1.0.1                                ...           10 months ago
  • 1.0.0                                ...           10 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 5
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |