@cisdi/pangu
develop tool for ui-engine project
Last updated 15 days ago by kagawa .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @cisdi/pangu 
SYNC missed versions from official npm registry.

@cisdi/pangu

pangu devtools for ui engine

用法

  • 安装

    npm i @cisdi/pangu --dev
    # 查看帮助
    pangu --help
    
  • 本地开发

    pangu dev
    # 查看帮助
    pangu dev --help
    
  • 打包

    pangu build
    # 查看帮助
    pangu build --help
    

自定义 Webpack 配置

支持两种方式自定义 Webpack 配置

  • 函数式

    // webpack.config.js
    module.exports = function(config) {
      // 修改配置
      return config
    }
    

其中 config 为现有配置

  • 对象式

    // webpack.config.js
    module.exports = {
      // 你的配置
    }
    

    此种方式修改的配置将会被使用 webpack-merge 合并

应用配置

根目录下放置 app.json 来配置应用,目前支持以下配置

{
  "appName": "应用名"
}

字段说明

  • appName: document.title 以及 process.env.APP_NAME

主题配置

根目录放置 theme.json 来配置主题,其原理是根据配置通过 lessmodifyVars 实现

  • 支持通过 extends 继承配置
  • 支持所有 Ant Design 主题配置
{
  "extends": "@ant-design/dark-theme",
  "primary-color": "#1890ff"
}

环境变量

编译时

  • process.env.NODE_ENV: Node 环境: development/production
  • process.env.PORT: 本地开发运行端口
  • process.env.HOST: 本地开发运行地址

运行时

  • process.env.APP_NAME: 应用名
  • process.env.APP_ENV: APP 环境: development===0/test===1/preproduction===2/production===3
  • process.env.NODE_ENV: Node 环境: development/production

Mock Server

基于 json-server

在根目录下创建 mocks/db.json 文件,参考 json-server 配置

Current Tags

  • 1.3.3                                ...           latest (15 days ago)

84 Versions

  • 1.3.3                                ...           15 days ago
  • 1.3.2                                ...           15 days ago
  • 1.3.1                                ...           15 days ago
  • 1.3.0                                ...           a month ago
  • 1.2.0                                ...           a month ago
  • 1.1.7                                ...           2 months ago
  • 1.1.6                                ...           2 months ago
  • 1.1.5                                ...           2 months ago
  • 1.1.4                                ...           2 months ago
  • 1.1.3                                ...           2 months ago
  • 1.1.2                                ...           2 months ago
  • 1.1.1                                ...           2 months ago
  • 1.1.0                                ...           2 months ago
  • 1.0.1                                ...           3 months ago
  • 1.0.0                                ...           3 months ago
  • 0.16.9                                ...           3 months ago
  • 0.16.8                                ...           4 months ago
  • 0.16.7                                ...           4 months ago
  • 0.16.6                                ...           4 months ago
  • 0.16.5                                ...           4 months ago
  • 0.16.4                                ...           4 months ago
  • 0.16.3                                ...           4 months ago
  • 0.16.2                                ...           4 months ago
  • 0.16.1                                ...           4 months ago
  • 0.16.0                                ...           5 months ago
  • 0.15.7                                ...           5 months ago
  • 0.15.6                                ...           5 months ago
  • 0.15.5                                ...           5 months ago
  • 0.13.1                                ...           6 months ago
  • 0.15.3                                ...           6 months ago
  • 0.15.2                                ...           6 months ago
  • 0.15.1                                ...           6 months ago
  • 0.15.0                                ...           6 months ago
  • 0.14.0                                ...           6 months ago
  • 0.13.3                                ...           6 months ago
  • 0.13.2                                ...           6 months ago
  • 0.13.0                                ...           6 months ago
  • 0.12.6                                ...           6 months ago
  • 0.12.5                                ...           6 months ago
  • 0.12.4                                ...           6 months ago
  • 0.12.3                                ...           6 months ago
  • 0.12.2                                ...           6 months ago
  • 0.12.1                                ...           6 months ago
  • 0.12.0                                ...           7 months ago
  • 0.11.4                                ...           7 months ago
  • 0.11.3                                ...           7 months ago
  • 0.11.2                                ...           7 months ago
  • 0.11.1                                ...           7 months ago
  • 0.11.0                                ...           7 months ago
  • 0.10.3                                ...           7 months ago
  • 0.10.2                                ...           7 months ago
  • 0.10.1                                ...           7 months ago
  • 0.10.0                                ...           7 months ago
  • 0.9.0                                ...           7 months ago
  • 0.8.3                                ...           7 months ago
  • 0.8.2                                ...           7 months ago
  • 0.8.1                                ...           7 months ago
  • 0.8.0                                ...           7 months ago
  • 0.7.4                                ...           7 months ago
  • 0.7.3                                ...           7 months ago
  • 0.7.2                                ...           7 months ago
  • 0.7.1                                ...           7 months ago
  • 0.7.0                                ...           7 months ago
  • 0.6.2                                ...           7 months ago
  • 0.6.1                                ...           7 months ago
  • 0.6.0                                ...           7 months ago
  • 0.5.0                                ...           7 months ago
  • 0.4.4                                ...           8 months ago
  • 0.4.3                                ...           8 months ago
  • 0.4.2                                ...           8 months ago
  • 0.4.1                                ...           8 months ago
  • 0.4.0                                ...           8 months ago
  • 0.3.0                                ...           8 months ago
  • 0.2.8                                ...           8 months ago
  • 0.2.7                                ...           8 months ago
  • 0.2.6                                ...           8 months ago
  • 0.2.5                                ...           8 months ago
  • 0.2.4                                ...           8 months ago
  • 0.2.3                                ...           8 months ago
  • 0.2.2                                ...           8 months ago
  • 0.2.1                                ...           8 months ago
  • 0.2.0                                ...           8 months ago
  • 0.1.0                                ...           8 months ago
  • 0.0.1                                ...           9 months ago
Maintainers (2)
Downloads
Today 0
This Week 86
This Month 86
Last Day 85
Last Week 15
Last Month 180
Dependencies (64)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |