This repository has been archived on 2022-05-10. You can view files and clone it, but cannot push or open issues or pull requests.
tghandbook/build.js

25 lines
928 B
JavaScript
Raw Normal View History

2020-06-17 13:48:05 +00:00
/* eslint-disable */
const Bundler = require("parcel-bundler");
const Path = require("path");
const entryFiles = Path.join(__dirname, "./index.html");
// Bundler options
const options = {
outDir: "./dist",
outFile: "index.html",
2020-06-17 13:54:30 +00:00
publicUrl: "/tghandbook" + process.env.SUBPATH + "/dist",
2020-06-17 13:48:05 +00:00
watch: false,
contentHash: false,
scopeHoist: false,
target: "browser",
logLevel: 3, // 5 = save everything to a file, 4 = like 3, but with timestamps and additionally log http requests to dev server, 3 = log info, warnings & errors, 2 = log warnings & errors, 1 = log errors, 0 = log nothing
sourceMaps: true, // Enable or disable sourcemaps, defaults to enabled (minified builds currently always create sourcemaps)
autoInstall: true, // Enable or disable auto install of missing dependencies found during bundling
};
(async () => {
const bundler = new Bundler(entryFiles, options);
await bundler.bundle();
})();