Work around private packages in Node 6

This commit is contained in:
Ron Buckton
2017-12-19 17:13:39 -08:00
parent ac51fa0773
commit c87b7252b6
3 changed files with 1667 additions and 56 deletions
+12 -9
View File
@@ -608,15 +608,18 @@ gulp.task("LKG", "Makes a new LKG out of the built js files", ["clean", "dontUse
return runSequence("LKGInternal", "VerifyLKG");
});
gulp.task("typemock", () => {
const typemock = tsc.createProject("scripts/typemock/tsconfig.json", getCompilerSettings({}, /*useBuiltCompiler*/ true));
return typemock.src()
.pipe(sourcemaps.init())
.pipe(newer("scripts/typemock/dist"))
.pipe(typemock())
.pipe(sourcemaps.write(".", <any>{ includeContent: false, destPath: "scripts/typemock/dist" }))
.pipe(gulp.dest("scripts/typemock/dist"));
});
// NOTE: This build task is currently commented out as the approach to including typemock as a private
// package does not seem to work in Node 6. If this issue cannot be resolved, this will be removed.
//// gulp.task("typemock", () => {
//// const typemock = tsc.createProject("scripts/typemock/tsconfig.json", getCompilerSettings({}, /*useBuiltCompiler*/ true));
//// return typemock.src()
//// .pipe(sourcemaps.init())
//// .pipe(newer("scripts/typemock/dist"))
//// .pipe(typemock())
//// .pipe(sourcemaps.write(".", <any>{ includeContent: false, destPath: "scripts/typemock/dist" }))
//// .pipe(gulp.dest("scripts/typemock/dist"));
//// });
gulp.task("typemock");
// Task to build the tests infrastructure using the built compiler
const run = path.join(builtLocalDirectory, "run.js");
+15 -12
View File
@@ -779,18 +779,21 @@ task("LKG", ["clean", "release", "local"].concat(libraryTargets), function () {
// Test directory
directory(builtLocalDirectory);
task("typemock", function () {
var startCompileTime = mark();
execCompiler(/*useBuiltCompiler*/ true, ["-p", "scripts/typemock/tsconfig.json"], function (error) {
if (error) {
fail("Compilation unsuccessful.");
}
else {
complete();
}
measure(startCompileTime);
});
}, { async: true });
// NOTE: This build task is currently commented out as the approach to including typemock as a private
// package does not seem to work in Node 6. If this issue cannot be resolved, this will be removed.
//// task("typemock", function () {
//// var startCompileTime = mark();
//// execCompiler(/*useBuiltCompiler*/ true, ["-p", "scripts/typemock/tsconfig.json"], function (error) {
//// if (error) {
//// fail("Compilation unsuccessful.");
//// }
//// else {
//// complete();
//// }
//// measure(startCompileTime);
//// });
//// }, { async: true });
task("typemock");
// Task to build the tests infrastructure using the built compiler
var run = path.join(builtLocalDirectory, "run.js");
+1640 -35
View File
File diff suppressed because it is too large Load Diff