1
0
mirror of https://github.com/lrsjng/pagemap.git synced 2025-08-11 23:44:04 +02:00
This commit is contained in:
Lars Jung
2019-04-04 23:40:40 +02:00
parent 94086fff4e
commit cfd5be77a9
4 changed files with 283 additions and 1318 deletions

24
ghu.js
View File

@@ -23,30 +23,8 @@ ghu.task('clean', () => {
});
ghu.task('build:script', runtime => {
const webpackConfig = {
mode: 'none',
output: {
library: NAME,
libraryTarget: 'umd',
umdNamedDefine: true,
globalObject: '(typeof self !== \'undefined\' ? self : this)'
},
module: {
rules: [
{
include: [SRC],
loader: 'babel-loader',
query: {
cacheDirectory: true,
presets: ['@babel/preset-env']
}
}
]
}
};
return read(`${SRC}/${NAME}.js`)
.then(webpack(webpackConfig, {showStats: false}))
.then(webpack(webpack.cfg_umd(NAME, [SRC]), {showStats: false}))
.then(uglify())
.then(wrap(runtime.commentJs))
.then(write(`${DIST}/${NAME}.min.js`, {overwrite: true}))