mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 14:13:37 +08:00
update watch mode
This commit is contained in:
parent
9c3dc4ba3c
commit
9738455245
27
nico.js
27
nico.js
@ -28,31 +28,4 @@ exports.writers = [
|
||||
'nico-jsx.StaticWriter',
|
||||
'nico-jsx.FileWriter'
|
||||
];
|
||||
exports.middlewares = [{
|
||||
name: 'webpack',
|
||||
filter: /index\.js/,
|
||||
handle: function(req, res, next) {
|
||||
return webpackMiddleware(webpack(require('./webpack.config')), {
|
||||
// all options optional
|
||||
|
||||
noInfo: false,
|
||||
// display no info to console (only warnings and errors)
|
||||
|
||||
watchDelay: 300,
|
||||
// delay after change (only lazy: false)
|
||||
|
||||
publicPath: "/dist/",
|
||||
// public path to bind the middleware to
|
||||
// use the same as in webpack
|
||||
|
||||
headers: { "X-Custom-Header": "yes" },
|
||||
// custom headers
|
||||
|
||||
stats: {
|
||||
colors: true
|
||||
}
|
||||
// options for formating the statistics
|
||||
})(req, res, next);
|
||||
}
|
||||
}];
|
||||
// end settings }}
|
||||
|
@ -16,6 +16,7 @@
|
||||
"rc-calendar": "~3.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"concurrently": "~0.1.0",
|
||||
"css-loader": "~0.13.1",
|
||||
"gh-pages-cli": "~0.2.0",
|
||||
"json-loader": "~0.5.1",
|
||||
@ -23,12 +24,11 @@
|
||||
"lodash": "~3.8.0",
|
||||
"nico-jsx": "~0.5.3",
|
||||
"style-loader": "~0.12.2",
|
||||
"webpack": "~1.9.7",
|
||||
"webpack-dev-middleware": "~1.0.11"
|
||||
"webpack": "~1.9.7"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "npm run clean && webpack && nico build",
|
||||
"start": "npm run clean && nico server --watch",
|
||||
"start": "npm run clean && concurrent --kill-others 'webpack -w' 'nico server --watch'",
|
||||
"clean": "rm -rf _site",
|
||||
"deploy": "npm run build && gh-pages -d _site -b master"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user