Fix fs.copyFileSync not supported in Node 6
This commit is contained in:
parent
6e57d621c2
commit
5472f7a4a0
|
@ -3,6 +3,7 @@
|
|||
/// <reference types="jake" />
|
||||
|
||||
const fs = require("fs");
|
||||
const fs2 = require("fs-extra");
|
||||
const os = require("os");
|
||||
const path = require("path");
|
||||
const fold = require("travis-fold");
|
||||
|
@ -358,9 +359,9 @@ file(Paths.servicesDefinitionFile, [TaskNames.coreBuild], function() {
|
|||
fs.writeFileSync(Paths.servicesDefinitionFile, servicesContentWithoutConstEnums);
|
||||
|
||||
// Also build typescript.js, typescript.js.map, and typescript.d.ts
|
||||
fs.copyFileSync(Paths.servicesFile, Paths.typescriptFile);
|
||||
jake.cpR(Paths.servicesFile, Paths.typescriptFile);
|
||||
if (fs.existsSync(Paths.servicesFile + ".map")) {
|
||||
fs.copyFileSync(Paths.servicesFile + ".map", Paths.typescriptFile + ".map");
|
||||
jake.cpR(Paths.servicesFile + ".map", Paths.typescriptFile + ".map");
|
||||
}
|
||||
|
||||
fs.writeFileSync(Paths.typescriptDefinitionFile, servicesContentWithoutConstEnums + "\r\nexport = ts", { encoding: "utf-8" });
|
||||
|
|
Loading…
Reference in a new issue