diff --git a/.gitignore b/.gitignore index 3171f2b..38bf84d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,10 @@ .idea/ .c9/ node_modules/ -test/**/node_modules/ -test/assets/docs/ -test/**/typings/ -test/**/coverage/ +test/assets/**/node_modules/ +test/assets/**/docs/ +test/assets/**/typings/ +test/assets/**/coverage/ ts/*.js ts/*.js.map ts/typings/ diff --git a/dist/index.js b/dist/index.js index 227a781..4607260 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,3 +1,4 @@ +"use strict"; /// console.log("**** starting NPMTS ****"); var plugins = require("./npmts.plugins"); diff --git a/dist/npmts.compile.js b/dist/npmts.compile.js index 5eb6ed7..a1958de 100644 --- a/dist/npmts.compile.js +++ b/dist/npmts.compile.js @@ -1,89 +1,62 @@ +"use strict"; /// var plugins = require("./npmts.plugins"); var paths = require("./npmts.paths"); exports.run = function (configArg) { var done = plugins.Q.defer(); var config = configArg; - plugins.beautylog.log("now running custom tasks"); + plugins.beautylog.log("now compiling " + "TypeScript".yellow); var moduleStream = plugins.merge2({ end: false }); /* ------------------------------------------------- - * ----------- first install typings --------------- + * ----------- compile TypeScript -------------------------- * ----------------------------------------------- */ - var typingsDone = plugins.Q.defer(); - var typingsCounter = 0; - var typingsCounterAdvance = function () { - typingsCounter++; - if (typeof config.typings[typingsCounter] != "undefined") { - installTypings(); - } - else { - plugins.beautylog.success("custom typings installed successfully"); - typingsDone.resolve(); - } - }; - var installTypings = function () { - plugins.beautylog.log("now installing " + "typings.json".yellow + " from " + config.typings[typingsCounter].blue); - plugins.typings.install({ production: false, cwd: plugins.path.join(paths.cwd, config.typings[typingsCounter]) }) - .then(function () { - typingsCounterAdvance(); - }, function () { - plugins.beautylog.error("something went wrong: Check if path is correct: " + config.typings[typingsCounter].blue); - typingsCounterAdvance(); - }); - }; - installTypings(); - /* ------------------------------------------------- - * ----------- second compile TS ------------------- - * ----------------------------------------------- */ - typingsDone.promise.then(function () { - for (var key in config.ts) { - plugins.beautylog.log("now compiling" + key.blue); - var outputPathIsDir; - try { - if (plugins.fs.statSync(plugins.path.join(paths.cwd, config.ts[key])).isDirectory()) { - outputPathIsDir = true; - } + for (var key in config.ts) { + var outputPathIsDir; + try { + if (plugins.fs.statSync(plugins.path.join(paths.cwd, config.ts[key])).isDirectory()) { + outputPathIsDir = true; } - catch (err) { - outputPathIsDir = false; - } - //do some evaluation of the environment - var outputNameSpecified = (!outputPathIsDir - && (plugins.path.extname(config.ts[key]) == ".js")); - var outputName = (function () { - if (outputNameSpecified) { - return plugins.path.basename(config.ts[key]); - } - else { - return undefined; - } - })(); - var outputDir = (function () { - if (outputNameSpecified) { - return plugins.path.dirname(plugins.path.join(paths.cwd, config.ts[key])); - } - else { - return plugins.path.join(paths.cwd, config.ts[key]); - } - })(); - var stream = plugins.gulp.src([plugins.path.join(paths.cwd, key), "!**/typings/**"]) - .pipe(plugins.g.sourcemaps.init()) // This means sourcemaps will be generated - .pipe(plugins.g.typescript({ - out: outputName, - target: "ES5", - module: "commonjs" - })) - .pipe(plugins.g.sourcemaps.write()) // Now the sourcemaps are added to the .js file - .pipe(plugins.gulp.dest(outputDir)); - moduleStream.add(stream); } - moduleStream.on("queueDrain", function () { - plugins.beautylog.success("custom TypeScript installed successfully"); - moduleStream.on("finish", function () { - done.resolve(config); - }); - moduleStream.end(); + catch (err) { + outputPathIsDir = false; + } + //do some evaluation of the environment + var outputNameSpecified = (!outputPathIsDir + && (plugins.path.extname(config.ts[key]) == ".js")); + var outputName = (function () { + if (outputNameSpecified) { + return plugins.path.basename(config.ts[key]); + } + else { + return undefined; + } + })(); + var outputDir = (function () { + if (outputNameSpecified) { + return plugins.path.dirname(plugins.path.join(paths.cwd, config.ts[key])); + } + else { + return plugins.path.join(paths.cwd, config.ts[key]); + } + })(); + var stream = plugins.gulp.src([plugins.path.join(paths.cwd, key), "!**/typings/**"]) + .pipe(plugins.g.sourcemaps.init()) // This means sourcemaps will be generated + .pipe(plugins.g.typescript({ + out: outputName, + target: "ES5", + module: "commonjs" + })) + .pipe(plugins.g.sourcemaps.write()) // Now the sourcemaps are added to the .js file + .pipe(plugins.gulp.dest(outputDir)); + moduleStream.add(stream); + } + moduleStream.on("queueDrain", function () { + plugins.beautylog.ok("TypeScript is compiled!"); + moduleStream.on("finish", function () { + done.resolve(config); }); + moduleStream.end(); }); + /*==================== END TYPESCRIPT =====================*/ return done.promise; }; diff --git a/dist/npmts.configfile.js b/dist/npmts.configfile.js index 4180514..d7e091a 100644 --- a/dist/npmts.configfile.js +++ b/dist/npmts.configfile.js @@ -1,3 +1,4 @@ +"use strict"; /// var plugins = require("./npmts.plugins"); var paths = require("./npmts.paths"); @@ -16,6 +17,7 @@ exports.run = function () { break; default: plugins.beautylog.error("mode " + config.mode.yellow + " not recognised!".red); + process.exit(1); } ; } diff --git a/dist/npmts.install.js b/dist/npmts.install.js new file mode 100644 index 0000000..e3616fd --- /dev/null +++ b/dist/npmts.install.js @@ -0,0 +1,20 @@ +"use strict"; +/// +var plugins = require("./npmts.plugins"); +var paths = require("./npmts.paths"); +exports.run = function (configArg) { + var config = configArg; + var done = plugins.Q.defer(); + /* ------------------------------------------------- + * ----------- install typings --------------- + * ----------------------------------------------- */ + plugins.beautylog.log("now installing " + "typings".yellow); + var absoluteTypingsArray = plugins.smartpath.absolute(config.typings, paths.cwd); + plugins.gulp.src(absoluteTypingsArray) + .pipe(plugins.g.typings()) + .pipe(plugins.g.gFunction(function () { + plugins.beautylog.ok("typings are installed!"); + done.resolve(config); + }, "atEnd")); + return done.promise; +}; diff --git a/dist/npmts.jsdoc.js b/dist/npmts.jsdoc.js index 467695c..601bf7c 100644 --- a/dist/npmts.jsdoc.js +++ b/dist/npmts.jsdoc.js @@ -1,3 +1,4 @@ +"use strict"; /// var plugins = require("./npmts.plugins"); var paths = require("./npmts.paths"); @@ -13,6 +14,7 @@ var genJsdoc = function (configArg) { destination: paths.docsDir } }, function () { + plugins.beautylog.ok("JsDoc has been generated!"); done.resolve(configArg); })); return done.promise; @@ -42,7 +44,7 @@ var publishDocs = function (configArg) { plugins.beautylog.error('Error: Git failed'); plugins.shelljs.exit(1); } - plugins.beautylog.success("Docs have been deployed to GitHub"); + plugins.beautylog.ok("JsDoc has been deployed to GitHub!"); done.resolve(configArg); } else { diff --git a/dist/npmts.options.js b/dist/npmts.options.js index 2bbc84a..d1f9125 100644 --- a/dist/npmts.options.js +++ b/dist/npmts.options.js @@ -1,3 +1,4 @@ +"use strict"; /// var plugins = require("./npmts.plugins"); exports.run = function (configArg) { @@ -8,7 +9,7 @@ exports.run = function (configArg) { } if (config.mode == "default") { config.typings = [ - "./ts/" + "./ts/typings.json" ]; config.ts = (_a = {}, _a["./ts/**/*.ts"] = "./dist/", diff --git a/dist/npmts.paths.js b/dist/npmts.paths.js index 3aff933..89e7c83 100644 --- a/dist/npmts.paths.js +++ b/dist/npmts.paths.js @@ -1,3 +1,4 @@ +"use strict"; /// var plugins = require("./npmts.plugins"); var paths = {}; diff --git a/dist/npmts.plugins.js b/dist/npmts.plugins.js index 5388802..f26f891 100644 --- a/dist/npmts.plugins.js +++ b/dist/npmts.plugins.js @@ -1,3 +1,4 @@ +"use strict"; /// var plugins = { beautylog: require("beautylog"), @@ -10,7 +11,8 @@ var plugins = { jsdoc3: require("gulp-jsdoc3"), mocha: require("gulp-mocha"), sourcemaps: require("gulp-sourcemaps"), - typescript: require("gulp-typescript") + typescript: require("gulp-typescript"), + typings: require("gulp-typings") }, merge2: require("merge2"), projectinfo: require("projectinfo"), @@ -21,6 +23,6 @@ var plugins = { smartcli: require("smartcli"), smartenv: require("smartenv"), smartfile: require("smartfile"), - typings: require("typings") + smartpath: require("smartpath") }; module.exports = plugins; diff --git a/dist/npmts.promisechain.js b/dist/npmts.promisechain.js index f55b4c4..582008c 100644 --- a/dist/npmts.promisechain.js +++ b/dist/npmts.promisechain.js @@ -1,6 +1,8 @@ +"use strict"; /// var NpmtsConfigFile = require("./npmts.configfile"); var NpmtsOptions = require("./npmts.options"); +var NpmtsInstall = require("./npmts.install"); var NpmtsCompile = require("./npmts.compile"); var NpmtsJsdoc = require("./npmts.jsdoc"); var NpmtsTests = require("./npmts.tests"); @@ -8,6 +10,7 @@ exports.run = function () { var promisechain; NpmtsConfigFile.run() .then(NpmtsOptions.run) + .then(NpmtsInstall.run) .then(NpmtsCompile.run) .then(NpmtsJsdoc.run) .then(NpmtsTests.run); diff --git a/dist/npmts.tests.js b/dist/npmts.tests.js index ec928d9..daa38b2 100644 --- a/dist/npmts.tests.js +++ b/dist/npmts.tests.js @@ -1,3 +1,4 @@ +"use strict"; /// var plugins = require("./npmts.plugins"); var paths = require("./npmts.paths"); @@ -20,9 +21,13 @@ exports.run = function (configArg) { var coveralls = function () { plugins.beautylog.log("now uploading coverage data to coveralls"); var stream = plugins.gulp.src([plugins.path.join(paths.cwd, "./coverage/lcov.info")]) - .pipe(plugins.g.coveralls()); + .pipe(plugins.g.coveralls()) + .pipe(plugins.g.gFunction(function () { + plugins.beautylog.ok("coverage data has beend uploaded Coveralls!"); + }, "atEnd")); return stream; }; + plugins.beautylog.log("now starting tests"); istanbul().on("finish", function () { mocha().on("finish", function () { if (plugins.smartenv.getEnv().isTravis && config.coveralls) { @@ -31,6 +36,7 @@ exports.run = function (configArg) { }); } else { + plugins.beautylog.ok("Tests have passed!"); done.resolve(config); } }); diff --git a/package.json b/package.json index f9725cd..169c101 100644 --- a/package.json +++ b/package.json @@ -36,17 +36,17 @@ "gulp-jsdoc3": "^0.2.0", "gulp-mocha": "^2.2.0", "gulp-sourcemaps": "^1.6.0", - "gulp-typescript": "2.11.0", + "gulp-typescript": "2.12.1", "gulp-typings": "1.1.0", "merge2": "1.0.1", "projectinfo": "1.0.1", "q": "^1.4.1", "shelljs": "^0.6.0", "smartcli": "0.0.11", - "smartenv": "1.1.0", + "smartenv": "1.2.0", "smartfile": "0.0.11", - "source-map-support": "^0.4.0", - "typings": "^0.6.8" + "smartpath": "2.1.0", + "source-map-support": "^0.4.0" }, "devDependencies": { "gulp-typings": "^1.1.0" diff --git a/test/assets/custom.js b/test/assets/custom.js new file mode 100644 index 0000000..0c1d4b1 --- /dev/null +++ b/test/assets/custom.js @@ -0,0 +1,3 @@ +var hello = "hello"; + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImN1c3RvbS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxJQUFJLEtBQUssR0FBRyxPQUFPLENBQUMiLCJmaWxlIjoiY3VzdG9tLmpzIiwic291cmNlc0NvbnRlbnQiOlsidmFyIGhlbGxvID0gXCJoZWxsb1wiOyJdLCJzb3VyY2VSb290IjoiL3NvdXJjZS8ifQ== diff --git a/test/assets/npmts.json b/test/assets/npmts.json index 513ec50..a4534f4 100644 --- a/test/assets/npmts.json +++ b/test/assets/npmts.json @@ -1,13 +1,13 @@ { - "mode":"default", + "mode":"custom", "ts":{ "./customdir/*.ts":"./" }, "typings":[ - "./ts", - "./subts1/", - "./subts2/", - "./customdir" + "./ts/typings.json", + "./subts1/typings.json", + "./subts2/typings.json", + "./customdir/typings.json" ], "coveralls":true, "docs": { diff --git a/test/assets/tsfile1.js b/test/assets/tsfile1.js new file mode 100644 index 0000000..d618d8f --- /dev/null +++ b/test/assets/tsfile1.js @@ -0,0 +1,3 @@ +var something = "something"; + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRzZmlsZTEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsSUFBSSxTQUFTLEdBQUcsV0FBVyxDQUFDIiwiZmlsZSI6InRzZmlsZTEuanMiLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgc29tZXRoaW5nID0gXCJzb21ldGhpbmdcIjsiXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0= diff --git a/ts/npmts.compile.ts b/ts/npmts.compile.ts index ef695e5..635c80d 100644 --- a/ts/npmts.compile.ts +++ b/ts/npmts.compile.ts @@ -4,89 +4,66 @@ import paths = require("./npmts.paths"); export var run = function(configArg){ var done = plugins.Q.defer(); var config = configArg; - plugins.beautylog.log("now running custom tasks"); + plugins.beautylog.log("now compiling " + "TypeScript".yellow); var moduleStream = plugins.merge2({end: false}); - /* ------------------------------------------------- - * ----------- first install typings --------------- - * ----------------------------------------------- */ - var typingsDone = plugins.Q.defer(); - var typingsCounter:number = 0; - var typingsCounterAdvance = function(){ - typingsCounter++; - if(typeof config.typings[typingsCounter] != "undefined"){ - installTypings(); - } else { - plugins.beautylog.success("custom typings installed successfully"); - typingsDone.resolve(); - } - }; - var installTypings = function() { - plugins.beautylog.log("now installing " + "typings.json".yellow + " from " + config.typings[typingsCounter].blue); - plugins.typings.install({production: false, cwd: plugins.path.join(paths.cwd,config.typings[typingsCounter])}) - .then(function(){ - typingsCounterAdvance(); - },function(){ - plugins.beautylog.error("something went wrong: Check if path is correct: " + config.typings[typingsCounter].blue); - typingsCounterAdvance(); - }); - }; - installTypings(); - /* ------------------------------------------------- - * ----------- second compile TS ------------------- - * ----------------------------------------------- */ - typingsDone.promise.then(function(){ - for (var key in config.ts) { - plugins.beautylog.log("now compiling" + key.blue); - var outputPathIsDir:boolean; - try { - if(plugins.fs.statSync(plugins.path.join(paths.cwd,config.ts[key])).isDirectory()){ - outputPathIsDir = true; - } - } - catch(err) { - outputPathIsDir = false; - } - //do some evaluation of the environment - var outputNameSpecified:boolean = ( - !outputPathIsDir - && (plugins.path.extname(config.ts[key]) == ".js") - ); - var outputName = (function(){ - if(outputNameSpecified){ - return plugins.path.basename(config.ts[key]) - } else { - return undefined - } - })(); - var outputDir = (function(){ - if(outputNameSpecified){ - return plugins.path.dirname( - plugins.path.join(paths.cwd,config.ts[key]) - ) - } else { - return plugins.path.join(paths.cwd,config.ts[key]) - } - })(); - var stream = plugins.gulp.src([plugins.path.join(paths.cwd,key),"!**/typings/**"]) - .pipe(plugins.g.sourcemaps.init()) // This means sourcemaps will be generated - .pipe(plugins.g.typescript({ - out: outputName, - target: "ES5", - module: "commonjs" - })) - .pipe(plugins.g.sourcemaps.write()) // Now the sourcemaps are added to the .js file - //.pipe(plugins.g.header('#!/usr/bin/env node\n\n')) - .pipe(plugins.gulp.dest(outputDir)); - moduleStream.add(stream); + /* ------------------------------------------------- + * ----------- compile TypeScript -------------------------- + * ----------------------------------------------- */ + for (var key in config.ts) { + var outputPathIsDir:boolean; + try { + if(plugins.fs.statSync(plugins.path.join(paths.cwd,config.ts[key])).isDirectory()){ + outputPathIsDir = true; + } } - moduleStream.on("queueDrain",function(){ - plugins.beautylog.success("custom TypeScript installed successfully"); - moduleStream.on("finish",function(){ - done.resolve(config); - }); - moduleStream.end(); + catch(err) { + outputPathIsDir = false; + } + //do some evaluation of the environment + var outputNameSpecified:boolean = ( + !outputPathIsDir + && (plugins.path.extname(config.ts[key]) == ".js") + ); + var outputName = (function(){ + if(outputNameSpecified){ + return plugins.path.basename(config.ts[key]) + } else { + return undefined + } + })(); + var outputDir = (function(){ + if(outputNameSpecified){ + return plugins.path.dirname( + plugins.path.join(paths.cwd,config.ts[key]) + ) + } else { + return plugins.path.join(paths.cwd,config.ts[key]) + } + })(); + + var stream = plugins.gulp.src([plugins.path.join(paths.cwd,key),"!**/typings/**"]) + .pipe(plugins.g.sourcemaps.init()) // This means sourcemaps will be generated + .pipe(plugins.g.typescript({ + out: outputName, + target: "ES5", + module: "commonjs" + })) + .pipe(plugins.g.sourcemaps.write()) // Now the sourcemaps are added to the .js file + //.pipe(plugins.g.header('#!/usr/bin/env node\n\n')) + .pipe(plugins.gulp.dest(outputDir)); + moduleStream.add(stream); + } + moduleStream.on("queueDrain",function(){ + plugins.beautylog.ok("TypeScript is compiled!"); + moduleStream.on("finish",function(){ + done.resolve(config); }); + moduleStream.end(); }); + /*==================== END TYPESCRIPT =====================*/ + + + return done.promise; }; diff --git a/ts/npmts.configfile.ts b/ts/npmts.configfile.ts index 31179ed..8b748e0 100644 --- a/ts/npmts.configfile.ts +++ b/ts/npmts.configfile.ts @@ -16,6 +16,7 @@ export var run = function(){ break; default: plugins.beautylog.error("mode " + config.mode.yellow + " not recognised!".red); + process.exit(1); }; } else { plugins.beautylog.log("no config file found: so mode is " + "default".yellow); diff --git a/ts/npmts.install.ts b/ts/npmts.install.ts new file mode 100644 index 0000000..ac60e80 --- /dev/null +++ b/ts/npmts.install.ts @@ -0,0 +1,19 @@ +/// +import plugins = require("./npmts.plugins"); +import paths = require("./npmts.paths"); +export var run = function(configArg){ + var config = configArg; + var done = plugins.Q.defer(); + /* ------------------------------------------------- + * ----------- install typings --------------- + * ----------------------------------------------- */ + plugins.beautylog.log("now installing " + "typings".yellow); + let absoluteTypingsArray = plugins.smartpath.absolute(config.typings,paths.cwd); + plugins.gulp.src(absoluteTypingsArray) + .pipe(plugins.g.typings()) + .pipe(plugins.g.gFunction(function(){ + plugins.beautylog.ok("typings are installed!"); + done.resolve(config); + },"atEnd")); + return done.promise; +}; \ No newline at end of file diff --git a/ts/npmts.jsdoc.ts b/ts/npmts.jsdoc.ts index ca2bfc8..8cf66e0 100644 --- a/ts/npmts.jsdoc.ts +++ b/ts/npmts.jsdoc.ts @@ -14,6 +14,7 @@ var genJsdoc = function(configArg){ destination: paths.docsDir } }, function(){ + plugins.beautylog.ok("JsDoc has been generated!"); done.resolve(configArg) })); return done.promise; @@ -48,7 +49,7 @@ var publishDocs = function(configArg){ plugins.beautylog.error('Error: Git failed'); plugins.shelljs.exit(1); } - plugins.beautylog.success("Docs have been deployed to GitHub"); + plugins.beautylog.ok("JsDoc has been deployed to GitHub!"); done.resolve(configArg); } else { done.resolve(configArg); diff --git a/ts/npmts.options.ts b/ts/npmts.options.ts index 412cb08..7b6b431 100644 --- a/ts/npmts.options.ts +++ b/ts/npmts.options.ts @@ -8,7 +8,7 @@ export var run = function(configArg){ } if (config.mode == "default"){ config.typings = [ - "./ts/" + "./ts/typings.json" ]; config.ts = { ["./ts/**/*.ts"]: "./dist/", diff --git a/ts/npmts.plugins.ts b/ts/npmts.plugins.ts index 1ce28c5..78ab77a 100644 --- a/ts/npmts.plugins.ts +++ b/ts/npmts.plugins.ts @@ -10,7 +10,8 @@ var plugins = { jsdoc3: require("gulp-jsdoc3"), mocha: require("gulp-mocha"), sourcemaps: require("gulp-sourcemaps"), - typescript: require("gulp-typescript") + typescript: require("gulp-typescript"), + typings: require("gulp-typings") }, merge2: require("merge2"), @@ -22,6 +23,6 @@ var plugins = { smartcli: require("smartcli"), smartenv: require("smartenv"), smartfile: require("smartfile"), - typings: require("typings") + smartpath: require("smartpath") }; export = plugins; \ No newline at end of file diff --git a/ts/npmts.promisechain.ts b/ts/npmts.promisechain.ts index 6eab9bd..b8da0b5 100644 --- a/ts/npmts.promisechain.ts +++ b/ts/npmts.promisechain.ts @@ -1,6 +1,7 @@ /// import NpmtsConfigFile = require("./npmts.configfile"); import NpmtsOptions = require("./npmts.options"); +import NpmtsInstall = require("./npmts.install"); import NpmtsCompile = require("./npmts.compile"); import NpmtsJsdoc = require("./npmts.jsdoc"); import NpmtsTests = require("./npmts.tests"); @@ -8,6 +9,7 @@ export var run = function(){ var promisechain; NpmtsConfigFile.run() .then(NpmtsOptions.run) + .then(NpmtsInstall.run) .then(NpmtsCompile.run) .then(NpmtsJsdoc.run) .then(NpmtsTests.run); diff --git a/ts/npmts.tests.ts b/ts/npmts.tests.ts index 43a4f66..c7da4cc 100644 --- a/ts/npmts.tests.ts +++ b/ts/npmts.tests.ts @@ -26,10 +26,14 @@ export var run = function(configArg) { var coveralls = function(){ plugins.beautylog.log("now uploading coverage data to coveralls"); var stream = plugins.gulp.src([plugins.path.join(paths.cwd,"./coverage/lcov.info")]) - .pipe(plugins.g.coveralls()); + .pipe(plugins.g.coveralls()) + .pipe(plugins.g.gFunction(function(){ + plugins.beautylog.ok("coverage data has beend uploaded Coveralls!"); + },"atEnd")); return stream; }; + plugins.beautylog.log("now starting tests"); istanbul().on("finish",function(){ mocha().on("finish",function(){ if(plugins.smartenv.getEnv().isTravis && config.coveralls){ @@ -37,6 +41,7 @@ export var run = function(configArg) { done.resolve(config); }) } else { + plugins.beautylog.ok("Tests have passed!"); done.resolve(config); } })