fix 16 file treshold

This commit is contained in:
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