-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathminify.js
More file actions
executable file
·25 lines (21 loc) · 762 Bytes
/
Copy pathminify.js
File metadata and controls
executable file
·25 lines (21 loc) · 762 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* eslint-disable no-process-exit */
/* eslint-env node */
"use strict"
// Regenerate the minified release variants.
var resolve = require("path").resolve.bind(null, __dirname)
var cp = require("child_process")
var pkg = require("./package.json")
function spawn(file) {
var res = cp.spawnSync(resolve("node_modules/.bin/uglifyjs"), [
"--preamble", "/*" + pkg.name + " " + pkg.version +
" - Copyright (c) 2016-current, Isiah Meadows. " +
"Licensed under the ISC License.*/",
"--screw-ie8", "false",
"-cmo", resolve(file + ".min.js"),
resolve(file + ".js")
], {stdio: "inherit"})
if (res.error != null) throw res.error
if (res.status) process.exit(res.status)
}
spawn("r")
spawn("local")