@opd/pangu
v1.13.8
Published
develop tool for pangu project
Downloads
31
Readme
@opd/pangu
pangu devtools for ui engine
Usage
Install
npm i @opd/pangu --dev # help pangu --help
Local Develop
pangu dev # help pangu dev --help
Build
pangu build # help pangu build --help
Custom Webpack
Config
Function
// webpack.config.js module.exports = function (config) { // update config return config }
Object
// webpack.config.js module.exports = { // your config }
config will be merged by
webpack-merge
App Config
you can use app.json
to customize app config
{
"appName": "App Name"
}
Fields
appName
:document.title
andprocess.env.APP_NAME
Theme
you can use theme.json
to customize app theme
- Support
extends
- Support all
Ant Design
theme variables
{
"extends": "@ant-design/dark-theme",
"primary-color": "#1890ff"
}
Environment Variables
Build Time
process.env.NODE_ENV
:development
/production
process.env.PORT
: Dev Server Portprocess.env.HOST
: Dev Server Host
Run Time
process.env.APP_NAME
: APP Nameprocess.env.APP_ENV
:development
:0
test
:1
preproduction
:2
production
:3
process.env.NODE_ENV
:development
/production
Mock Server
Based on
json-server
you can use mocks/db.json
to setup mock server, see json-server
for more