mirror of
https://github.com/lrsjng/pagemap.git
synced 2025-08-11 23:44:04 +02:00
Update.
This commit is contained in:
24
ghu.js
24
ghu.js
@@ -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}))
|
||||
|
Reference in New Issue
Block a user