update to more favorable testfile loading approach

This commit is contained in:
Philipp Kunz 2017-07-30 22:27:51 +02:00
parent 0f5e451e60
commit e2d0a7a939
5 changed files with 2436 additions and 386 deletions

11
dist/mod02/index.js vendored
View File

@ -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',

2743
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -58,7 +58,7 @@
"smartstream": "^1.0.10",
"smartstring": "^2.0.24",
"smartsystem": "^1.0.18",
"tapbuffer": "^1.0.24",
"tapbuffer": "^1.0.29",
"through2": "^2.0.3",
"tsn": "^2.0.15",
"typescript": "^2.4.2",

View File

@ -36,9 +36,6 @@ let tap = function (configArg: INpmtsConfig) {
experimentalDecorators: true,
lib: [ 'DOM', 'ES5', 'ES2015.Promise', 'ES2015.Generator', 'ES2015.Iterable' ]
}),
plugins.gulpFunction.forEach(async file => {
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: INpmtsConfig) {
*/
let testFilesSmartstream = new plugins.smartstream.Smartstream([
plugins.smartgulp.src([ plugins.path.join(paths.cwd, 'test/*.ts') ]),
plugins.gulpFunction.forEach(async (fileArg: Smartfile) => {
let stringToModify = fileArg.contents.toString()
let testRegex = /\/\/\smodule\stestimport\nimport[a-zA-Z0-9\*\s]*\sfrom\s'(..\/ts\/index)'/
let replacer = (match: string, group1: string, offset: number, completeString: string) => {
return match.replace(group1, '../dist/index')
}
fileArg.contents = Buffer.from(stringToModify.replace(testRegex, replacer))
}),
plugins.gulpSourcemaps.init(),
plugins.gulpTypeScript({
target: 'ES5',

View File

@ -80,10 +80,6 @@
version "2.0.29"
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-2.0.29.tgz#5002e14f75e2d71e564281df0431c8c1b4a2a36a"
"@types/mocha@^2.2.31":
version "2.2.41"
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-2.2.41.tgz#e27cf0817153eb9f2713b2d3f6c68f1e1c3ca608"
"@types/node@*", "@types/node@^8.0.10":
version "8.0.17"
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.17.tgz#677bc8c118cfb76013febb62ede1f31d2c7222a1"
@ -106,9 +102,9 @@
dependencies:
"@types/node" "*"
"@types/source-map-support@^0.2.28":
version "0.2.28"
resolved "https://registry.yarnpkg.com/@types/source-map-support/-/source-map-support-0.2.28.tgz#ce6497dfa9c9fbd21a753955b4a51d8993d759dd"
"@types/source-map-support@^0.4.0":
version "0.4.0"
resolved "https://registry.yarnpkg.com/@types/source-map-support/-/source-map-support-0.4.0.tgz#a62a1866614af68c888173c001481f242aaf148b"
dependencies:
"@types/node" "*"
@ -1596,8 +1592,8 @@ js-tokens@^3.0.0:
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
js-yaml@3.x, js-yaml@^3.2.7, js-yaml@^3.3.1, js-yaml@^3.4.2, js-yaml@^3.7.0, js-yaml@^3.8.3:
version "3.9.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.9.0.tgz#4ffbbf25c2ac963b8299dc74da7e3740de1c18ce"
version "3.9.1"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.9.1.tgz#08775cebdfdd359209f0d2acd383c8f86a6904a0"
dependencies:
argparse "^1.0.7"
esprima "^4.0.0"
@ -1860,8 +1856,8 @@ map-obj@^1.0.0, map-obj@^1.0.1:
resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d"
mathjs@^3.10.3:
version "3.14.2"
resolved "https://registry.yarnpkg.com/mathjs/-/mathjs-3.14.2.tgz#bb79b7dc878b7f586ce408ab067a9a42db2e7a2d"
version "3.15.0"
resolved "https://registry.yarnpkg.com/mathjs/-/mathjs-3.15.0.tgz#520390fc6447f8e0e580b34a43427691c9ce671e"
dependencies:
complex.js "2.0.4"
decimal.js "7.2.3"
@ -2757,17 +2753,15 @@ smartgulp@^1.0.6:
smartstream "^1.0.8"
typings-global "^1.0.16"
smartinject@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/smartinject/-/smartinject-1.0.1.tgz#c345e8035b6c8349acda3da64ff6c684f649919a"
smartinject@^1.0.15:
version "1.0.15"
resolved "https://registry.yarnpkg.com/smartinject/-/smartinject-1.0.15.tgz#9b25e4311e92b586aab5b01cbd28f8482b3f11fe"
dependencies:
"@types/source-map-support" "^0.2.28"
"@types/through2" "^2.0.32"
smartchai "^1.0.3"
source-map-support "^0.4.11"
"@types/source-map-support" "^0.4.0"
"@types/through2" "^2.0.33"
source-map-support "^0.4.15"
through2 "^2.0.3"
typings-global "^1.0.14"
typings-test "^1.0.3"
typings-global "^1.0.20"
smartipc@^1.0.9:
version "1.0.9"
@ -2872,7 +2866,7 @@ source-map-resolve@^0.3.0:
source-map-url "~0.3.0"
urix "~0.1.0"
source-map-support@^0.4.11, source-map-support@^0.4.15:
source-map-support@^0.4.15:
version "0.4.15"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.15.tgz#03202df65c06d2bd8c7ec2362a193056fef8d3b1"
dependencies:
@ -3086,9 +3080,9 @@ tap-parser@^5.1.0:
optionalDependencies:
readable-stream "^2"
tapbuffer@^1.0.24:
version "1.0.24"
resolved "https://registry.yarnpkg.com/tapbuffer/-/tapbuffer-1.0.24.tgz#5f6779061f3d45261cda78edcde69736c91090a3"
tapbuffer@^1.0.29:
version "1.0.29"
resolved "https://registry.yarnpkg.com/tapbuffer/-/tapbuffer-1.0.29.tgz#dbff08197a889912ea5be68ad9bfa37b6ca98dd1"
dependencies:
"@types/istanbul" "^0.4.29"
beautylog "^6.1.10"
@ -3097,12 +3091,12 @@ tapbuffer@^1.0.24:
remap-istanbul "^0.9.5"
smarterror "^1.0.3"
smartfile "^4.2.17"
smartinject "^1.0.1"
smartinject "^1.0.15"
smartipc "^1.0.9"
smartq "^1.1.6"
smartshell "^1.0.13"
tap-mocha-reporter "^3.0.6"
typings-global "^1.0.19"
typings-global "^1.0.20"
tar-pack@^3.4.0:
version "3.4.0"
@ -3255,20 +3249,13 @@ typescript@^2.1.5, typescript@^2.4.2:
version "2.4.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.4.2.tgz#f8395f85d459276067c988aa41837a8f82870844"
typings-global@*, typings-global@^1.0.14, typings-global@^1.0.16, typings-global@^1.0.17, typings-global@^1.0.19, typings-global@^1.0.20, typings-global@^1.0.3:
typings-global@^1.0.14, typings-global@^1.0.16, typings-global@^1.0.17, typings-global@^1.0.19, typings-global@^1.0.20, typings-global@^1.0.3:
version "1.0.20"
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.20.tgz#3da769c54db538247c5d877d1d9e97eb2ec981ff"
dependencies:
semver "^5.3.0"
smartshell "^1.0.6"
typings-test@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/typings-test/-/typings-test-1.0.3.tgz#fbab895eb3f0c44842e73db059f65946b971e369"
dependencies:
"@types/mocha" "^2.2.31"
typings-global "*"
uglify-js@^2.6:
version "2.8.29"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd"