ts-project-bundle
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -9,3 +9,5 @@ export interface ITsBundlerArgs { | ||
invoke(args: ITsBundlerArgs): Promise<void>; | ||
private copyFile; | ||
private copyDir; | ||
private copyCompiledPackaged; | ||
} |
@@ -118,2 +118,36 @@ "use strict"; | ||
// | ||
// Copies a file. | ||
// | ||
TsBundler.prototype.copyFile = function (from, to) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
console.log("cp " + from + " " + to); | ||
return [4 /*yield*/, fs_extra_1.copyFile(from, to)]; | ||
case 1: | ||
_a.sent(); | ||
return [2 /*return*/]; | ||
} | ||
}); | ||
}); | ||
}; | ||
// | ||
// Copies a directory. | ||
// | ||
TsBundler.prototype.copyDir = function (from, to) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
console.log("cp -r " + from + " " + to); | ||
return [4 /*yield*/, fs_extra_1.copy(from, to)]; | ||
case 1: | ||
_a.sent(); | ||
return [2 /*return*/]; | ||
} | ||
}); | ||
}); | ||
}; | ||
// | ||
// Copies a compiled TypeScript package to the output directory. | ||
@@ -131,6 +165,6 @@ // | ||
_a.sent(); | ||
return [4 /*yield*/, fs_extra_1.copyFile(path.join(fullPackagePath, "package.json"), path.join(fullOutPath, "package.json"))]; | ||
return [4 /*yield*/, this.copyFile(path.join(fullPackagePath, "package.json"), path.join(fullOutPath, "package.json"))]; | ||
case 2: | ||
_a.sent(); | ||
return [4 /*yield*/, fs_extra_1.copyFile(path.join(fullPackagePath, "package-lock.json"), path.join(fullOutPath, "package-lock.json"))]; | ||
return [4 /*yield*/, this.copyFile(path.join(fullPackagePath, "package-lock.json"), path.join(fullOutPath, "package-lock.json"))]; | ||
case 3: | ||
@@ -140,3 +174,3 @@ _a.sent(); | ||
fullOutDistPath = path.join(fullOutPath, packageTsConfig.compilerOptions.outDir); | ||
return [4 /*yield*/, fs_extra_1.copy(fullDistPath, fullOutDistPath)]; | ||
return [4 /*yield*/, this.copyDir(fullDistPath, fullOutDistPath)]; | ||
case 4: | ||
@@ -143,0 +177,0 @@ _a.sent(); |
{ | ||
"name": "ts-project-bundle", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "A simple bundler for TypeScript projects using TypeScript project references.", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
Sorry, the diff of this file is not supported yet
26736
386