forked from reshadi/jakets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTsc.js
31 lines (31 loc) · 1.14 KB
/
Tsc.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
28
29
30
31
"use strict";
var Node = require("./Node");
exports.Exec = Node.CreateNodeExec("tsc", "tsc --version ", "typescript/lib/tsc.js");
// import fs = require("fs");
// import path = require("path");
// var TSC = (function() {
// let localTypescript = path.join(process.cwd(), "node_modules/typescript/lib/tsc.js");
// let jaketsTypescript = path.join(__dirname, "node_modules/typescript/lib/tsc.js");
// let tscCmd = "tsc"; //default is the one in the path
// try {
// if (fs.statSync(localTypescript)) {
// tscCmd = "node " + localTypescript;
// } else {
// let execSync = require('child_process').execSync;
// execSync("tsc --version "); //Confirms the global one exists
// }
// } catch (e) {
// tscCmd = "node " + jaketsTypescript;
// }
// return tscCmd;
// })(); //path.join(__dirname, "node_modules", ".bin", "tsc");
//
// export function Exec(args, callback) {
// //var args = Array.prototype.join(arguments, " ");
// if (!Array.isArray(args)) {
// args = [args];
// }
// var cmd = args.map(function(arg) { return TSC + " " + arg; });
// jake.Exec(cmd, callback);
// }
//# sourceMappingURL=Tsc.js.map