mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 16:06:28 +08:00
update release scripts
This commit is contained in:
parent
113da093d2
commit
68a6b221c5
@ -59,8 +59,8 @@ $ npm start
|
||||
$ npm run deploy
|
||||
```
|
||||
|
||||
#### 构建
|
||||
#### 发布
|
||||
|
||||
```bash
|
||||
$ npm run build
|
||||
$ npm run release
|
||||
```
|
||||
|
@ -77,8 +77,9 @@
|
||||
"babel": "babel components --out-dir lib",
|
||||
"build": "npm run clean && webpack && nico build",
|
||||
"pack": "npm run clean && webpack --optimize-minimize && nico build",
|
||||
"release": "npm run clean && webpack --config webpack.config.production.js && webpack --config webpack.config.min.js && zip dist/${npm_package_name}-${npm_package_version}.zip -j dist dist/*",
|
||||
"start": "npm run clean && nico server --watch",
|
||||
"clean": "rm -rf _site",
|
||||
"clean": "rm -rf _site dist",
|
||||
"deploy": "rm -rf node_modules && node scripts/install.js && npm run pack && node scripts/deploy.js",
|
||||
"lint": "eslint components index.js --ext '.js,.jsx'",
|
||||
"test": "webpack && npm run lint",
|
||||
|
16
webpack.config.min.js
vendored
Normal file
16
webpack.config.min.js
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
// webpack.config.min.js
|
||||
// release min dist files
|
||||
var pkg = require('./package');
|
||||
var webpack = require("webpack");
|
||||
var ExtractTextPlugin = require("extract-text-webpack-plugin");
|
||||
var config = require("./webpack.config.js");
|
||||
|
||||
config.plugins = [
|
||||
new ExtractTextPlugin('[name].min.css'),
|
||||
new webpack.optimize.UglifyJsPlugin()
|
||||
];
|
||||
config.output.filename = config.output.filename.replace(/\.js$/, ".min.js");
|
||||
delete config.entry.demo;
|
||||
delete config.entry[pkg.name];
|
||||
|
||||
module.exports = config;
|
14
webpack.config.production.js
Normal file
14
webpack.config.production.js
Normal file
@ -0,0 +1,14 @@
|
||||
// webpack.config.production.js
|
||||
// release full dist files
|
||||
var pkg = require('./package');
|
||||
var webpack = require("webpack");
|
||||
var ExtractTextPlugin = require("extract-text-webpack-plugin");
|
||||
var config = require("./webpack.config.js");
|
||||
|
||||
config.plugins = [
|
||||
new ExtractTextPlugin('[name].css')
|
||||
];
|
||||
delete config.entry.demo;
|
||||
delete config.entry[pkg.name];
|
||||
|
||||
module.exports = config;
|
Loading…
Reference in New Issue
Block a user