This commit is contained in:
Lars Jung 2019-04-05 23:02:26 +02:00
parent 52ff7462a9
commit 566338020a
3 changed files with 2775 additions and 2060 deletions

28
ghu.js
View file

@ -10,24 +10,14 @@ const TEST = join(ROOT, 'test');
const BUILD = join(ROOT, 'build'); const BUILD = join(ROOT, 'build');
const mapper = mapfn.p(SRC, BUILD).s('.less', '.css').s('.pug', ''); const mapper = mapfn.p(SRC, BUILD).s('.less', '.css').s('.pug', '');
const webpack_cfg = (...include) => ({ const webpack_cfg = (...include) => {
module: { const cfg = webpack.cfg(include);
loaders: [ cfg.module.rules.push({
{ test: /jsdom/,
include, loader: 'null-loader'
loader: 'babel-loader', });
query: { return cfg;
cacheDirectory: true, };
presets: ['babel-preset-env']
}
},
{
test: /jsdom/,
loader: 'null-loader'
}
]
}
});
ghu.defaults('release'); ghu.defaults('release');
@ -68,7 +58,7 @@ ghu.task('build:scripts', runtime => {
.then(webpack(webpack_cfg(SRC), {showStats: false})) .then(webpack(webpack_cfg(SRC), {showStats: false}))
.then(wrap('\n\n// @include "pre.js"\n\n')) .then(wrap('\n\n// @include "pre.js"\n\n'))
.then(includeit()) .then(includeit())
.then(ife(() => runtime.args.production, uglify({compressor: {warnings: false}}))) .then(ife(() => runtime.args.production, uglify()))
.then(wrap(runtime.comment_js)) .then(wrap(runtime.comment_js))
.then(write(mapper, {overwrite: true})); .then(write(mapper, {overwrite: true}));
}); });

4788
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{ {
"name": "h5ai", "name": "h5ai",
"version": "0.29.2", "version": "0.29.3",
"description": "Modern HTTP web server index.", "description": "Modern HTTP web server index.",
"homepage": "https://larsjung.de/h5ai/", "homepage": "https://larsjung.de/h5ai/",
"bugs": "https://github.com/lrsjng/h5ai/issues", "bugs": "https://github.com/lrsjng/h5ai/issues",
@ -17,17 +17,18 @@
"precommit": "npm run lint && npm run test" "precommit": "npm run lint && npm run test"
}, },
"devDependencies": { "devDependencies": {
"babel-loader": "7.1.1", "@babel/core": "7.4.3",
"babel-preset-env": "1.7.0", "@babel/preset-env": "7.4.3",
"eslint": "5.15.3", "babel-loader": "8.0.5",
"ghu": "0.13.0", "eslint": "5.16.0",
"ghu": "0.17.0",
"jsdom": "14.0.0", "jsdom": "14.0.0",
"kjua": "0.2.0", "kjua": "0.4.0",
"lolight": "1.0.0", "lolight": "1.2.0",
"marked": "0.6.1", "marked": "0.6.2",
"normalize.css": "8.0.1", "normalize.css": "8.0.1",
"null-loader": "0.1.1", "null-loader": "0.1.1",
"scar": "1.2.0" "scar": "1.5.0"
}, },
"engines": { "engines": {
"node": ">=10.0.0" "node": ">=10.0.0"