mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Fix standalone build
This commit is contained in:
parent
01800f3006
commit
2c0f0f2152
@ -6,9 +6,9 @@ const fse = require("fs-extra");
|
|||||||
const execSync = require("child_process").execSync;
|
const execSync = require("child_process").execSync;
|
||||||
|
|
||||||
function gulptasksStandalone($, gulp, buildFolder) {
|
function gulptasksStandalone($, gulp, buildFolder) {
|
||||||
const electronBaseDir = path.join("../electron");
|
const electronBaseDir = path.join(__dirname, "..", "electron");
|
||||||
|
|
||||||
const tempDestDir = path.join("..", "tmp_standalone_files");
|
const tempDestDir = path.join(__dirname, "..", "tmp_standalone_files");
|
||||||
const tempDestBuildDir = path.join(tempDestDir, "built");
|
const tempDestBuildDir = path.join(tempDestDir, "built");
|
||||||
|
|
||||||
gulp.task("standalone.prepare.cleanup", () => {
|
gulp.task("standalone.prepare.cleanup", () => {
|
||||||
@ -47,47 +47,49 @@ function gulptasksStandalone($, gulp, buildFolder) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
gulp.task("standalone.prepare.minifyCode", () => {
|
gulp.task("standalone.prepare.minifyCode", () => {
|
||||||
return gulp
|
return (
|
||||||
|
gulp
|
||||||
.src(path.join(electronBaseDir, "*.js"))
|
.src(path.join(electronBaseDir, "*.js"))
|
||||||
.pipe(
|
// .pipe(
|
||||||
$.terser({
|
// $.terser({
|
||||||
ecma: 6,
|
// ecma: 6,
|
||||||
parse: {},
|
// parse: {},
|
||||||
module: false,
|
// module: false,
|
||||||
toplevel: true,
|
// toplevel: true,
|
||||||
keep_classnames: false,
|
// keep_classnames: false,
|
||||||
keep_fnames: false,
|
// keep_fnames: false,
|
||||||
safari10: false,
|
// safari10: false,
|
||||||
compress: {
|
// compress: {
|
||||||
arguments: false, // breaks
|
// arguments: false, // breaks
|
||||||
drop_console: false,
|
// drop_console: false,
|
||||||
// keep_fargs: false,
|
// // keep_fargs: false,
|
||||||
keep_infinity: true,
|
// keep_infinity: true,
|
||||||
passes: 2,
|
// passes: 2,
|
||||||
module: false,
|
// module: false,
|
||||||
toplevel: true,
|
// toplevel: true,
|
||||||
unsafe_math: true,
|
// unsafe_math: true,
|
||||||
unsafe_arrows: false,
|
// unsafe_arrows: false,
|
||||||
warnings: true,
|
// warnings: true,
|
||||||
},
|
// },
|
||||||
mangle: {
|
// mangle: {
|
||||||
eval: true,
|
// eval: true,
|
||||||
keep_classnames: false,
|
// keep_classnames: false,
|
||||||
keep_fnames: false,
|
// keep_fnames: false,
|
||||||
module: false,
|
// module: false,
|
||||||
toplevel: true,
|
// toplevel: true,
|
||||||
safari10: false,
|
// safari10: false,
|
||||||
},
|
// },
|
||||||
output: {
|
// output: {
|
||||||
comments: false,
|
// comments: false,
|
||||||
ascii_only: true,
|
// ascii_only: true,
|
||||||
beautify: false,
|
// beautify: false,
|
||||||
braces: false,
|
// braces: false,
|
||||||
ecma: 6,
|
// ecma: 6,
|
||||||
},
|
// },
|
||||||
})
|
// })
|
||||||
)
|
// )
|
||||||
.pipe(gulp.dest(tempDestBuildDir));
|
.pipe(gulp.dest(tempDestBuildDir))
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task("standalone.prepare.copyGamefiles", () => {
|
gulp.task("standalone.prepare.copyGamefiles", () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user