fix 16 file treshold

This commit is contained in:
Philipp Kunz 2016-11-25 13:03:41 +01:00
parent 57aa38af89
commit 7e61b49d04
6 changed files with 47 additions and 26 deletions

17
dist/mod02/index.js vendored
View File

@ -14,8 +14,8 @@ let mocha = function (configArg) {
npmts_log_1.npmtsOra.text('Instrumentalizing and testing transpiled JS');
npmts_log_1.npmtsOra.end(); // end npmtsOra for tests.
let done = q.defer();
let babelCoverageSmartstream = new plugins.smartstream.Smartstream([
plugins.gulp.src([plugins.path.join(paths.cwd, 'dist/*.js')]),
let coverageSmartstream = new plugins.smartstream.Smartstream([
plugins.gulp.src([plugins.path.join(paths.cwd, './dist/**/*.js')]),
plugins.gulpSourcemaps.init(),
plugins.gulpBabel({
presets: [
@ -24,7 +24,12 @@ let mocha = function (configArg) {
}),
plugins.gulpIstanbul({}),
plugins.gulpSourcemaps.write(),
plugins.gulpInjectModules()
plugins.gulpInjectModules(),
plugins.through2.obj((file, enc, cb) => {
cb(null, file);
}, (cb) => {
cb();
})
]);
let localSmartstream = new plugins.smartstream.Smartstream([
plugins.gulp.src([plugins.path.join(paths.cwd, 'test/test.js')]),
@ -40,9 +45,9 @@ let mocha = function (configArg) {
reporters: ['lcovonly', 'json', 'text', 'text-summary']
})
]);
babelCoverageSmartstream.run()
coverageSmartstream.run()
.then(() => {
plugins.beautylog.info('transpiled code to ES5 for use in mocha');
plugins.beautylog.info('code is now transpiled to ES5, instrumented with istanbul, and injected for mocha!');
return localSmartstream.run()
.then(() => { done.resolve(configArg); }, (err) => {
plugins.beautylog.error('Tests failed!');
@ -93,7 +98,7 @@ exports.run = function (configArg) {
.then(coverage)
.then(() => {
done.resolve(config);
});
}).catch(err => { console.log(err); });
}
else {
npmts_log_1.npmtsOra.end();

View File

@ -13,5 +13,6 @@ import * as smartpath from 'smartpath';
import * as smartstream from 'smartstream';
import * as smartstring from 'smartstring';
import * as smartsystem from 'smartsystem';
import * as through2 from 'through2';
export declare let sourceMapSupport: any;
export { beautylog, depcheck, lodash, npmextra, projectinfo, path, smartcli, smartcov, smartenv, smartfile, smartpath, smartstream, smartstring, smartsystem };
export { beautylog, depcheck, lodash, npmextra, projectinfo, path, smartcli, smartcov, smartenv, smartfile, smartpath, smartstream, smartstring, smartsystem, through2 };

View File

@ -28,4 +28,6 @@ const smartstring = require("smartstring");
exports.smartstring = smartstring;
const smartsystem = require("smartsystem");
exports.smartsystem = smartsystem;
const through2 = require("through2");
exports.through2 = through2;
exports.sourceMapSupport = require('source-map-support').install(); // display errors correctly during testing

View File

@ -10,7 +10,7 @@
"test": "(npm run compile && npm run prepareTest && npm run setupCheck && npm run check && npm run checkVersion && npm run checkNoTest && npm run checkNoDocs)",
"testShort": "(npm run compile && npm run check)",
"prepareTest": "(rm -rf test/)",
"compile": "(rm -r dist/ && tsc)",
"compile": "(rm -rf dist/ && tsc)",
"setupCheck": "(git clone https://gitlab.com/sandboxzone/sandbox-npmts.git test/)",
"typedoc": "(typedoc --out ./pages/api --target ES6 ./ts/)",
"npmpage": "(npmpage)",
@ -41,36 +41,38 @@
"@types/gulp-sourcemaps": "0.0.29",
"@types/minimatch": "^2.0.29",
"@types/q": "^0.x.x",
"@types/shelljs": "^0.3.32",
"@types/shelljs": "^0.3.33",
"@types/through2": "^2.0.32",
"babel-preset-es2015": "^6.18.0",
"beautylog": "6.0.0",
"depcheck": "^0.6.4",
"depcheck": "^0.6.5",
"early": "^2.0.35",
"gulp": "3.9.1",
"gulp-babel": "^6.1.2",
"gulp-function": "^2.2.0",
"gulp-function": "^2.2.2",
"gulp-inject-modules": "^1.0.0",
"gulp-istanbul": "^1.1.1",
"gulp-mocha": "^3.0.1",
"gulp-sourcemaps": "^2.2.0",
"gulp-typedoc": "^2.0.0",
"lodash": "^4.16.4",
"lodash": "^4.17.2",
"npmextra": "^2.0.3",
"projectinfo": "1.0.4",
"q": "^1.4.1",
"shelljs": "^0.7.5",
"smartchok": "^1.0.2",
"smartcli": "1.0.10",
"smartchok": "^1.0.4",
"smartcli": "1.0.15",
"smartcov": "1.0.0",
"smartenv": "1.2.5",
"smartenv": "2.0.0",
"smartfile": "4.1.0",
"smartpath": "3.2.5",
"smartstream": "^1.0.5",
"smartstring": "^2.0.17",
"smartstring": "^2.0.22",
"smartsystem": "^1.0.9",
"source-map-support": "^0.4.5",
"source-map-support": "^0.4.6",
"through2": "^2.0.1",
"tsn": "^2.0.13",
"typedoc": "^0.5.0",
"typedoc": "^0.5.1",
"typescript": "next",
"typings-global": "^1.0.14"
},

View File

@ -17,8 +17,9 @@ let mocha = function (configArg: INpmtsConfig) {
npmtsOra.text('Instrumentalizing and testing transpiled JS')
npmtsOra.end() // end npmtsOra for tests.
let done = q.defer()
let babelCoverageSmartstream = new plugins.smartstream.Smartstream([
plugins.gulp.src([plugins.path.join(paths.cwd, 'dist/*.js')]),
let coverageSmartstream = new plugins.smartstream.Smartstream([
plugins.gulp.src([plugins.path.join(paths.cwd, './dist/**/*.js')]),
plugins.gulpSourcemaps.init(),
plugins.gulpBabel({
presets: [
@ -28,8 +29,17 @@ let mocha = function (configArg: INpmtsConfig) {
plugins.gulpIstanbul({
}),
plugins.gulpSourcemaps.write(),
plugins.gulpInjectModules()
plugins.gulpInjectModules(),
plugins.through2.obj(
(file, enc, cb) => {
cb(null, file)
},
(cb) => {
cb()
}
)
])
let localSmartstream = new plugins.smartstream.Smartstream([
plugins.gulp.src([plugins.path.join(paths.cwd, 'test/test.js')]),
plugins.gulpBabel({
@ -44,11 +54,10 @@ let mocha = function (configArg: INpmtsConfig) {
reporters: ['lcovonly', 'json', 'text', 'text-summary']
})
])
babelCoverageSmartstream.run()
coverageSmartstream.run()
.then(
() => {
plugins.beautylog.info('transpiled code to ES5 for use in mocha')
plugins.beautylog.info('code is now transpiled to ES5, instrumented with istanbul, and injected for mocha!')
return localSmartstream.run()
.then(() => { done.resolve(configArg) }, (err) => {
plugins.beautylog.error('Tests failed!')
@ -105,7 +114,7 @@ export let run = function (configArg: INpmtsConfig) {
.then(coverage)
.then(() => {
done.resolve(config)
})
}).catch(err => { console.log(err) })
} else {
npmtsOra.end()
done.resolve(config)

View File

@ -14,6 +14,7 @@ import * as smartpath from 'smartpath'
import * as smartstream from 'smartstream'
import * as smartstring from 'smartstring'
import * as smartsystem from 'smartsystem'
import * as through2 from 'through2'
export let sourceMapSupport = require('source-map-support').install() // display errors correctly during testing
export {
@ -30,5 +31,6 @@ export {
smartpath,
smartstream,
smartstring,
smartsystem
smartsystem,
through2
}