update to more favorable testfile loading approach
This commit is contained in:
11
dist/mod02/index.js
vendored
11
dist/mod02/index.js
vendored
@ -37,9 +37,6 @@ let tap = function (configArg) {
|
||||
experimentalDecorators: true,
|
||||
lib: ['DOM', 'ES5', 'ES2015.Promise', 'ES2015.Generator', 'ES2015.Iterable']
|
||||
}),
|
||||
plugins.gulpFunction.forEach((file) => __awaiter(this, void 0, void 0, function* () {
|
||||
file.path = file.path.replace(paths.tsDir, paths.distDir);
|
||||
})),
|
||||
plugins.gulpSourcemaps.write(),
|
||||
npmtsTapBuffer.pipeTestableFiles(),
|
||||
plugins.smartstream.cleanPipe()
|
||||
@ -49,14 +46,6 @@ let tap = function (configArg) {
|
||||
*/
|
||||
let testFilesSmartstream = new plugins.smartstream.Smartstream([
|
||||
plugins.smartgulp.src([plugins.path.join(paths.cwd, 'test/*.ts')]),
|
||||
plugins.gulpFunction.forEach((fileArg) => __awaiter(this, void 0, void 0, function* () {
|
||||
let stringToModify = fileArg.contents.toString();
|
||||
let testRegex = /\/\/\smodule\stestimport\nimport[a-zA-Z0-9\*\s]*\sfrom\s'(..\/ts\/index)'/;
|
||||
let replacer = (match, group1, offset, completeString) => {
|
||||
return match.replace(group1, '../dist/index');
|
||||
};
|
||||
fileArg.contents = Buffer.from(stringToModify.replace(testRegex, replacer));
|
||||
})),
|
||||
plugins.gulpSourcemaps.init(),
|
||||
plugins.gulpTypeScript({
|
||||
target: 'ES5',
|
||||
|
Reference in New Issue
Block a user