forked from reshadi/jakets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBrowserify.js
27 lines (27 loc) · 869 Bytes
/
Browserify.js
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
26
27
"use strict";
var Path = require("path");
var Jake = require("./Jake");
var Node = require("./Node");
var RawExec = Node.CreateNodeExec("browserify", "browserify --help", "browserify/bin/cmd.js");
var Tsify = "tsify";
Tsify = Node.FindModulePath(Tsify) || Tsify;
var Collapser = "bundle-collapser/plugin.js";
Collapser = Node.FindModulePath(Collapser) || Collapser;
function Exec(inputs, output, callback, isRelease, tsargs, options) {
var args = inputs;
args += " -p [ " + Tsify + " " + (tsargs || "") + " ]";
if (isRelease) {
args += " -p [ " + Collapser + " ]";
}
else {
args += " --debug";
}
args += " --outfile " + output;
if (options) {
args += " " + options;
}
Jake.Shell.mkdir("-p", Path.dirname(output));
RawExec(args, callback);
}
exports.Exec = Exec;
//# sourceMappingURL=Browserify.js.map