2019-07-02 05:17:20 -05:00
|
|
|
const path = require('path');
|
|
|
|
const merge = require('webpack-merge');
|
|
|
|
const exec = require('child_process').exec;
|
2019-07-18 00:37:55 -05:00
|
|
|
const WatchPlugin = require('webpack-watch-files-plugin').default;
|
|
|
|
const ShellPlugin = require('webpack-shell-plugin');
|
|
|
|
const common = require('./webpack.common.js');
|
2019-07-02 05:17:20 -05:00
|
|
|
|
|
|
|
module.exports = merge(common, {
|
|
|
|
mode: 'development',
|
|
|
|
watch: true,
|
|
|
|
devServer: {
|
2019-07-18 00:37:55 -05:00
|
|
|
contentBase: path.join(__dirname, 'docs/build/html'),
|
|
|
|
watchContentBase: true,
|
2019-07-02 05:17:20 -05:00
|
|
|
compress: false,
|
2019-07-18 17:51:27 -05:00
|
|
|
port: 1919,
|
2019-07-18 00:37:55 -05:00
|
|
|
hot: false,
|
|
|
|
liveReload: true,
|
|
|
|
publicPath: '/_static/'
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new WatchPlugin({
|
|
|
|
files: [
|
|
|
|
'./docs/**/*.rst',
|
|
|
|
'./docs/**/*.py',
|
|
|
|
]
|
|
|
|
}),
|
|
|
|
new ShellPlugin({
|
2019-07-18 17:51:27 -05:00
|
|
|
onBuildEnd: ['make -C docs clean html'],
|
|
|
|
// dev=false here to force every build to trigger make, the default is
|
|
|
|
// first build only.
|
2019-07-18 00:37:55 -05:00
|
|
|
dev: false,
|
|
|
|
}),
|
|
|
|
]
|
|
|
|
});
|