diff --git a/dist/npmts.compile.js b/dist/npmts.compile.js
index e72dfbc..7e2de84 100644
--- a/dist/npmts.compile.js
+++ b/dist/npmts.compile.js
@@ -1,7 +1,6 @@
"use strict";
require("typings-global");
var plugins = require("./npmts.plugins");
-var paths = require("./npmts.paths");
var helpers = require("./npmts.compile.helpers");
var npmts_promisechain_1 = require("./npmts.promisechain");
var compileTs = function (tsFileArrayArg, tsOptionsArg) {
@@ -20,7 +19,8 @@ var compileTs = function (tsFileArrayArg, tsOptionsArg) {
};
for (var keyArg in tsFileArrayArg) {
if (helpers.checkOutputPath(tsFileArrayArg, keyArg)) {
- var tsStream = plugins.gulp.src([plugins.path.join(paths.cwd, keyArg), "!**/typings/**"]);
+ var filesToConvert = plugins.smartfile.fs.listFileTree(plugins.path.resolve(keyArg), "**/*.ts");
+ plugins.tsn.compile(filesToConvert, tsFileArrayArg[keyArg]);
}
}
return done.promise;
diff --git a/dist/npmts.plugins.d.ts b/dist/npmts.plugins.d.ts
index 10dfe91..6b55acc 100644
--- a/dist/npmts.plugins.d.ts
+++ b/dist/npmts.plugins.d.ts
@@ -7,9 +7,6 @@ export declare let g: {
jsdoc3: any;
mocha: any;
replace: any;
- sourcemaps: any;
- typescript: any;
- typings: any;
};
export declare let lodashObject: any;
export declare let merge2: any;
@@ -25,3 +22,4 @@ export import smartfile = require("smartfile");
export import smartpath = require("smartpath");
export import smartstring = require("smartstring");
export declare let sourceMapSupport: any;
+export import tsn = require("tsn");
diff --git a/dist/npmts.plugins.js b/dist/npmts.plugins.js
index 231260a..496506e 100644
--- a/dist/npmts.plugins.js
+++ b/dist/npmts.plugins.js
@@ -7,10 +7,7 @@ exports.g = {
istanbul: require("gulp-istanbul"),
jsdoc3: require("gulp-jsdoc3"),
mocha: require("gulp-mocha"),
- replace: require("gulp-replace"),
- sourcemaps: require("gulp-sourcemaps"),
- typescript: require("gulp-typescript"),
- typings: require("gulp-typings")
+ replace: require("gulp-replace")
};
exports.lodashObject = require('lodash/fp/object');
exports.merge2 = require("merge2");
@@ -26,3 +23,4 @@ exports.smartfile = require("smartfile");
exports.smartpath = require("smartpath");
exports.smartstring = require("smartstring");
exports.sourceMapSupport = require("source-map-support").install(); // this is required to display errors correctly during testing
+exports.tsn = require("tsn");
diff --git a/dist/test/assets/customdir/custom.d.ts b/dist/test/assets/customdir/custom.d.ts
deleted file mode 100644
index d8c1b2d..0000000
--- a/dist/test/assets/customdir/custom.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-declare var hello: string;
diff --git a/dist/test/assets/customdir/custom.js b/dist/test/assets/customdir/custom.js
deleted file mode 100644
index ea15f04..0000000
--- a/dist/test/assets/customdir/custom.js
+++ /dev/null
@@ -1 +0,0 @@
-var hello = "hello";
diff --git a/dist/test/assets/customdir/tsfile1.d.ts b/dist/test/assets/customdir/tsfile1.d.ts
deleted file mode 100644
index 0cd9444..0000000
--- a/dist/test/assets/customdir/tsfile1.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-declare var something: string;
diff --git a/dist/test/assets/customdir/tsfile1.js b/dist/test/assets/customdir/tsfile1.js
deleted file mode 100644
index 4400885..0000000
--- a/dist/test/assets/customdir/tsfile1.js
+++ /dev/null
@@ -1 +0,0 @@
-var something = "something";
diff --git a/dist/test/assets/test/test.d.ts b/dist/test/assets/test/test.d.ts
deleted file mode 100644
index c408306..0000000
--- a/dist/test/assets/test/test.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-declare var testplugin: any;
diff --git a/dist/test/assets/test/test.js b/dist/test/assets/test/test.js
deleted file mode 100644
index b0c7804..0000000
--- a/dist/test/assets/test/test.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var testplugin = require("../dist/index.js");
-describe("testplugins", function () {
- describe(".logSomething", function () {
- it("should log something", function () {
- testplugin.logSomething();
- });
- });
-});
diff --git a/dist/test/assets/ts/index.d.ts b/dist/test/assets/ts/index.d.ts
deleted file mode 100644
index 6fc0276..0000000
--- a/dist/test/assets/ts/index.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-declare let testplugin: {
- logSomething: () => void;
-};
-export = testplugin;
diff --git a/dist/test/assets/ts/index.js b/dist/test/assets/ts/index.js
deleted file mode 100644
index 8e34d40..0000000
--- a/dist/test/assets/ts/index.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-var testplugin = {
- logSomething: function () {
- console.log("only function executed");
- }
-};
-module.exports = testplugin;
diff --git a/dist/ts/index.d.ts b/dist/ts/index.d.ts
deleted file mode 100644
index 62d7805..0000000
--- a/dist/ts/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-import "typings-global";
diff --git a/dist/ts/index.js b/dist/ts/index.js
deleted file mode 100644
index c23259d..0000000
--- a/dist/ts/index.js
+++ /dev/null
@@ -1,28 +0,0 @@
-"use strict";
-require("typings-global");
-/* ================================================== *
- Starting NPMTS main process.
- * ================================================== */
-var early = require("early");
-early.start("NPMTS");
-var plugins = require("./npmts.plugins");
-var paths = require("./npmts.paths");
-var npmts_promisechain_1 = require("./npmts.promisechain");
-early.stop()
- .then(function () {
- var npmtsProjectInfo = new plugins.projectinfo.ProjectinfoNpm(paths.npmtsPackageRoot);
- var npmtsCli = new plugins.smartcli.Smartcli();
- npmtsCli.standardTask()
- .then(function (argvArg) {
- plugins.beautylog.figletSync("NPMTS");
- plugins.beautylog.info("npmts version: " + npmtsProjectInfo.version);
- try {
- npmts_promisechain_1.promisechain(argvArg);
- }
- catch (err) {
- console.log(err);
- }
- });
- npmtsCli.addVersion(npmtsProjectInfo.version);
- npmtsCli.startParse();
-});
diff --git a/dist/ts/npmts.assets.d.ts b/dist/ts/npmts.assets.d.ts
deleted file mode 100644
index f32981b..0000000
--- a/dist/ts/npmts.assets.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-///
-import "typings-global";
-import plugins = require("./npmts.plugins");
-export declare var run: (configArg: any) => plugins.Q.Promise<{}>;
diff --git a/dist/ts/npmts.assets.js b/dist/ts/npmts.assets.js
deleted file mode 100644
index 68aec77..0000000
--- a/dist/ts/npmts.assets.js
+++ /dev/null
@@ -1,19 +0,0 @@
-"use strict";
-require("typings-global");
-var plugins = require("./npmts.plugins");
-var paths = require("./npmts.paths");
-var npmts_promisechain_1 = require("./npmts.promisechain");
-exports.run = function (configArg) {
- var done = plugins.Q.defer();
- var config = configArg;
- npmts_promisechain_1.npmtsOra.text("now looking at " + "required assets".yellow);
- if (config.cli == true) {
- plugins.smartfile.fsaction.copy(plugins.path.join(paths.npmtsAssetsDir, "cli.js"), paths.distDir);
- plugins.beautylog.ok("installed CLI assets!");
- done.resolve(config);
- }
- else {
- done.resolve(config);
- }
- return done.promise;
-};
diff --git a/dist/ts/npmts.clean.d.ts b/dist/ts/npmts.clean.d.ts
deleted file mode 100644
index cc7c7a9..0000000
--- a/dist/ts/npmts.clean.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-///
-import "typings-global";
-import plugins = require("./npmts.plugins");
-export declare let run: (configArg: any) => plugins.Q.Promise<{}>;
diff --git a/dist/ts/npmts.clean.js b/dist/ts/npmts.clean.js
deleted file mode 100644
index c542206..0000000
--- a/dist/ts/npmts.clean.js
+++ /dev/null
@@ -1,30 +0,0 @@
-"use strict";
-require("typings-global");
-var plugins = require("./npmts.plugins");
-var paths = require("./npmts.paths");
-var npmts_promisechain_1 = require("./npmts.promisechain");
-var removeDist = function () {
- npmts_promisechain_1.npmtsOra.text("cleaning " + "dist".yellow + " folder");
- return plugins.smartfile.fsaction.remove(paths.distDir);
-};
-var removeTypings = function () {
- var done = plugins.Q.defer();
- npmts_promisechain_1.npmtsOra.text("cleaning " + "typings".yellow + " folder");
- if (false) {
- }
- else {
- done.resolve();
- }
- return done.promise;
-};
-exports.run = function (configArg) {
- npmts_promisechain_1.npmtsOra.text("cleaning up from previous builds...");
- var done = plugins.Q.defer();
- removeDist()
- .then(removeTypings)
- .then(function () {
- plugins.beautylog.ok("Cleaned up from previous builds!");
- done.resolve(configArg);
- });
- return done.promise;
-};
diff --git a/dist/ts/npmts.cli.d.ts b/dist/ts/npmts.cli.d.ts
deleted file mode 100644
index 62d7805..0000000
--- a/dist/ts/npmts.cli.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-import "typings-global";
diff --git a/dist/ts/npmts.cli.js b/dist/ts/npmts.cli.js
deleted file mode 100644
index d9b688b..0000000
--- a/dist/ts/npmts.cli.js
+++ /dev/null
@@ -1,2 +0,0 @@
-"use strict";
-require("typings-global");
diff --git a/dist/ts/npmts.compile.d.ts b/dist/ts/npmts.compile.d.ts
deleted file mode 100644
index cc7c7a9..0000000
--- a/dist/ts/npmts.compile.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-///
-import "typings-global";
-import plugins = require("./npmts.plugins");
-export declare let run: (configArg: any) => plugins.Q.Promise<{}>;
diff --git a/dist/ts/npmts.compile.helpers.d.ts b/dist/ts/npmts.compile.helpers.d.ts
deleted file mode 100644
index 176e31f..0000000
--- a/dist/ts/npmts.compile.helpers.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-export declare let checkOutputPath: (tsArrayArg: any, keyArg: any) => boolean;
diff --git a/dist/ts/npmts.compile.helpers.js b/dist/ts/npmts.compile.helpers.js
deleted file mode 100644
index b47eb29..0000000
--- a/dist/ts/npmts.compile.helpers.js
+++ /dev/null
@@ -1,16 +0,0 @@
-"use strict";
-var plugins = require("./npmts.plugins");
-var paths = require("./npmts.paths");
-var outputPathIsDir = function (tsArrayArg, keyArg) {
- return plugins.smartpath.check.isDir(plugins.path.join(paths.cwd, tsArrayArg[keyArg]));
-};
-exports.checkOutputPath = function (tsArrayArg, keyArg) {
- if (!outputPathIsDir(tsArrayArg, keyArg)) {
- plugins.beautylog.warn("Skipping " + keyArg + " because " + tsArrayArg[keyArg] + " it is no directory!");
- return false;
- }
- else {
- return true;
- }
- ;
-};
diff --git a/dist/ts/npmts.compile.js b/dist/ts/npmts.compile.js
deleted file mode 100644
index e72dfbc..0000000
--- a/dist/ts/npmts.compile.js
+++ /dev/null
@@ -1,41 +0,0 @@
-"use strict";
-require("typings-global");
-var plugins = require("./npmts.plugins");
-var paths = require("./npmts.paths");
-var helpers = require("./npmts.compile.helpers");
-var npmts_promisechain_1 = require("./npmts.promisechain");
-var compileTs = function (tsFileArrayArg, tsOptionsArg) {
- if (tsOptionsArg === void 0) { tsOptionsArg = {}; }
- var done = plugins.Q.defer();
- var tsOptionsDefault = {
- declaration: true,
- target: "ES5",
- module: "commonjs"
- };
- /**
- * merges default ts options with those found in npmts.json
- */
- var tsOptions = function (keyArg) {
- return plugins.lodashObject.assign(tsOptionsDefault, tsOptionsArg);
- };
- for (var keyArg in tsFileArrayArg) {
- if (helpers.checkOutputPath(tsFileArrayArg, keyArg)) {
- var tsStream = plugins.gulp.src([plugins.path.join(paths.cwd, keyArg), "!**/typings/**"]);
- }
- }
- return done.promise;
-};
-exports.run = function (configArg) {
- var done = plugins.Q.defer();
- var config = configArg;
- npmts_promisechain_1.npmtsOra.text("now compiling " + "TypeScript".yellow);
- compileTs(config.ts, config.tsOptions)
- .then(function () {
- compileTs(config.testTs);
- })
- .then(function () {
- plugins.beautylog.ok("compiled TypeScript!");
- done.resolve(config);
- });
- return done.promise;
-};
diff --git a/dist/ts/npmts.configfile.d.ts b/dist/ts/npmts.configfile.d.ts
deleted file mode 100644
index 1b6f363..0000000
--- a/dist/ts/npmts.configfile.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-///
-import "typings-global";
-import plugins = require("./npmts.plugins");
-export declare var run: (argvArg: any) => plugins.Q.Promise<{}>;
diff --git a/dist/ts/npmts.configfile.js b/dist/ts/npmts.configfile.js
deleted file mode 100644
index be0ea8f..0000000
--- a/dist/ts/npmts.configfile.js
+++ /dev/null
@@ -1,34 +0,0 @@
-"use strict";
-require("typings-global");
-var plugins = require("./npmts.plugins");
-var paths = require("./npmts.paths");
-exports.run = function (argvArg) {
- var done = plugins.Q.defer();
- var config = {};
- var configPath = plugins.path.join(paths.cwd, "npmts.json");
- if (argvArg.notest) {
- config.notest = true;
- }
- if (plugins.smartfile.checks.fileExistsSync(configPath)) {
- plugins.beautylog.info("npmts.json".blue + " config file found!");
- config = plugins.lodashObject.assign(config, plugins.smartfile.local.toObjectSync(configPath));
- switch (config.mode) {
- case "default":
- case "custom":
- plugins.beautylog.ok("mode is " + config.mode.yellow);
- done.resolve(config);
- 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);
- config.mode = "default";
- done.resolve(config);
- }
- ;
- return done.promise;
-};
diff --git a/dist/ts/npmts.jsdoc.d.ts b/dist/ts/npmts.jsdoc.d.ts
deleted file mode 100644
index cc7c7a9..0000000
--- a/dist/ts/npmts.jsdoc.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-///
-import "typings-global";
-import plugins = require("./npmts.plugins");
-export declare let run: (configArg: any) => plugins.Q.Promise<{}>;
diff --git a/dist/ts/npmts.jsdoc.js b/dist/ts/npmts.jsdoc.js
deleted file mode 100644
index 1e3278c..0000000
--- a/dist/ts/npmts.jsdoc.js
+++ /dev/null
@@ -1,28 +0,0 @@
-"use strict";
-require("typings-global");
-var plugins = require("./npmts.plugins");
-var paths = require("./npmts.paths");
-var npmts_promisechain_1 = require("./npmts.promisechain");
-var genJsdoc = function (configArg) {
- var done = plugins.Q.defer();
- npmts_promisechain_1.npmtsOra.text("now generating " + "JsDoc documentation".yellow);
- plugins.gulp.src([
- plugins.path.join(paths.cwd, "README.md"),
- plugins.path.join(paths.distDir, "**/*.js")
- ])
- .pipe(plugins.g.jsdoc3({
- opts: {
- destination: paths.docsDir
- }
- }, function () {
- plugins.beautylog.ok("JsDoc documentation has been generated!");
- done.resolve(configArg);
- }));
- return done.promise;
-};
-exports.run = function (configArg) {
- var done = plugins.Q.defer();
- genJsdoc(configArg)
- .then(done.resolve);
- return done.promise;
-};
diff --git a/dist/ts/npmts.options.d.ts b/dist/ts/npmts.options.d.ts
deleted file mode 100644
index c5fdcc7..0000000
--- a/dist/ts/npmts.options.d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-///
-import "typings-global";
-import plugins = require("./npmts.plugins");
-export declare let isCi: () => any;
-export declare var run: (configArg: any) => plugins.Q.Promise<{}>;
diff --git a/dist/ts/npmts.options.js b/dist/ts/npmts.options.js
deleted file mode 100644
index 57e0825..0000000
--- a/dist/ts/npmts.options.js
+++ /dev/null
@@ -1,36 +0,0 @@
-"use strict";
-require("typings-global");
-var plugins = require("./npmts.plugins");
-var npmts_promisechain_1 = require("./npmts.promisechain");
-exports.isCi = function () {
- return plugins.smartci.check.isCi();
-};
-exports.run = function (configArg) {
- var done = plugins.Q.defer();
- var config = configArg;
- npmts_promisechain_1.npmtsOra.text("now determining build options...");
- //handle default mode
- if (config.mode == "default") {
- config.typings = [
- "./ts/typings.json"
- ];
- config.ts = (_a = {},
- _a["./ts/**/*.ts"] = "./dist/",
- _a
- );
- config.testTs = (_b = {},
- _b["./test/test.ts"] = "./test/",
- _b
- );
- config.test = ["./index.js"];
- }
- //check if config.tsOptions is available
- config.tsOptions ? void (0) : config.tsOptions = {};
- config.coverageTreshold ? void (0) : config.coverageTreshold = 70;
- // handle docs
- config.docs ? void (0) : config.docs = {};
- plugins.beautylog.ok("build options are ready!");
- done.resolve(config);
- return done.promise;
- var _a, _b;
-};
diff --git a/dist/ts/npmts.paths.d.ts b/dist/ts/npmts.paths.d.ts
deleted file mode 100644
index 74d2da3..0000000
--- a/dist/ts/npmts.paths.d.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import "typings-global";
-export declare let npmtsPackageRoot: string;
-export declare let cwd: string;
-export declare let tsDir: string;
-export declare let distDir: string;
-export declare let docsDir: string;
-export declare let testDir: string;
-export declare let typingsDir: string;
-export declare let coverageDir: string;
-export declare let npmtsAssetsDir: string;
-export declare let indexTS: string;
-export declare let testTS: string;
diff --git a/dist/ts/npmts.paths.js b/dist/ts/npmts.paths.js
deleted file mode 100644
index 0b81540..0000000
--- a/dist/ts/npmts.paths.js
+++ /dev/null
@@ -1,18 +0,0 @@
-"use strict";
-require("typings-global");
-var plugins = require("./npmts.plugins");
-//Npmts Paths
-exports.npmtsPackageRoot = plugins.path.join(__dirname, "../");
-//Project paths
-exports.cwd = process.cwd();
-//Directories
-exports.tsDir = plugins.path.join(exports.cwd, "ts/");
-exports.distDir = plugins.path.join(exports.cwd, "dist/");
-exports.docsDir = plugins.path.join(exports.cwd, "docs/");
-exports.testDir = plugins.path.join(exports.cwd, "test/");
-exports.typingsDir = plugins.path.join(exports.cwd, "ts/typings/");
-exports.coverageDir = plugins.path.join(exports.cwd, "coverage/");
-exports.npmtsAssetsDir = plugins.path.join(__dirname, "../assets/");
-//Files
-exports.indexTS = plugins.path.join(exports.cwd, "ts/index.ts");
-exports.testTS = plugins.path.join(exports.cwd, "ts/test.ts");
diff --git a/dist/ts/npmts.plugins.d.ts b/dist/ts/npmts.plugins.d.ts
deleted file mode 100644
index ab789fc..0000000
--- a/dist/ts/npmts.plugins.d.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import "typings-global";
-export import beautylog = require("beautylog");
-export import fs = require("fs-extra");
-export declare let gulp: any;
-export declare let g: {
- gFunction: any;
- istanbul: any;
- jsdoc3: any;
- mocha: any;
- replace: any;
- sourcemaps: any;
- typescript: any;
- typings: any;
-};
-export declare let lodashObject: any;
-export declare let merge2: any;
-export import projectinfo = require("projectinfo");
-export import path = require("path");
-export import Q = require("q");
-export import shelljs = require("shelljs");
-export import smartci = require("smartci");
-export import smartcli = require("smartcli");
-export import smartcov = require("smartcov");
-export import smartenv = require("smartenv");
-export import smartfile = require("smartfile");
-export import smartpath = require("smartpath");
-export import smartstring = require("smartstring");
-export declare let sourceMapSupport: any;
diff --git a/dist/ts/npmts.plugins.js b/dist/ts/npmts.plugins.js
deleted file mode 100644
index 09fdf52..0000000
--- a/dist/ts/npmts.plugins.js
+++ /dev/null
@@ -1,29 +0,0 @@
-"use strict";
-require("typings-global");
-exports.beautylog = require("beautylog");
-exports.fs = require("fs-extra");
-exports.gulp = require("gulp");
-exports.g = {
- gFunction: require("gulp-function"),
- istanbul: require("gulp-istanbul"),
- jsdoc3: require("gulp-jsdoc3"),
- mocha: require("gulp-mocha"),
- replace: require("gulp-replace"),
- sourcemaps: require("gulp-sourcemaps"),
- typescript: require("gulp-typescript"),
- typings: require("gulp-typings")
-};
-exports.lodashObject = require('lodash/fp/object');
-exports.merge2 = require("merge2");
-exports.projectinfo = require("projectinfo");
-exports.path = require("path");
-exports.Q = require("q");
-exports.shelljs = require("shelljs");
-exports.smartci = require("smartci");
-exports.smartcli = require("smartcli");
-exports.smartcov = require("smartcov");
-exports.smartenv = require("smartenv");
-exports.smartfile = require("smartfile");
-exports.smartpath = require("smartpath");
-exports.smartstring = require("smartstring");
-exports.sourceMapSupport = require("source-map-support").install(); // this is required to display errors correctly during testing
diff --git a/dist/ts/npmts.promisechain.js b/dist/ts/npmts.promisechain.js
deleted file mode 100644
index c26f714..0000000
--- a/dist/ts/npmts.promisechain.js
+++ /dev/null
@@ -1,47 +0,0 @@
-"use strict";
-require("typings-global");
-var plugins = require("./npmts.plugins");
-exports.npmtsOra = new plugins.beautylog.Ora("setting up TaskChain", "cyan");
-var NpmtsAssets = require("./npmts.assets");
-var NpmtsClean = require("./npmts.clean");
-var NpmtsCompile = require("./npmts.compile");
-var NpmtsConfigFile = require("./npmts.configfile");
-var NpmtsJsdoc = require("./npmts.jsdoc");
-var NpmtsOptions = require("./npmts.options");
-var NpmtsTests = require("./npmts.tests");
-exports.promisechain = function (argvArg) {
- var done = plugins.Q.defer();
- exports.npmtsOra.start();
- NpmtsConfigFile.run(argvArg)
- .then(NpmtsOptions.run)
- .then(NpmtsClean.run)
- .then(NpmtsCompile.run)
- .then(NpmtsAssets.run)
- .then(NpmtsJsdoc.run)
- .then(NpmtsTests.run)
- .then(function (configArg) {
- var shipString = "" +
- "\n" +
- "\n" +
- " # # ( )\n" +
- " ___#_#___|__\n" +
- " _ |____________| _\n" +
- " _=====| | | | | |==== _\n" +
- " =====| |.---------------------------. | |====\n" +
- " <--------------------' . . . . . . . . '--------------/\n" +
- " \\ /\n" +
- " \\___________________________________________________________/\n" +
- " wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww\n" +
- " wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww\n" +
- " wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww\n";
- if (process.env.CI) {
- console.log(shipString);
- plugins.beautylog.success("READY TO SHIP!");
- }
- else {
- plugins.beautylog.success("Done!");
- }
- done.resolve();
- });
- return done.promise;
-};
diff --git a/dist/ts/npmts.tests.d.ts b/dist/ts/npmts.tests.d.ts
deleted file mode 100644
index cc7c7a9..0000000
--- a/dist/ts/npmts.tests.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-///
-import "typings-global";
-import plugins = require("./npmts.plugins");
-export declare let run: (configArg: any) => plugins.Q.Promise<{}>;
diff --git a/dist/ts/npmts.tests.js b/dist/ts/npmts.tests.js
deleted file mode 100644
index c13542a..0000000
--- a/dist/ts/npmts.tests.js
+++ /dev/null
@@ -1,76 +0,0 @@
-"use strict";
-require("typings-global");
-var plugins = require("./npmts.plugins");
-var paths = require("./npmts.paths");
-var npmts_promisechain_1 = require("./npmts.promisechain");
-/**
- *
- * @returns {*}
- */
-var istanbul = function (configArg) {
- npmts_promisechain_1.npmtsOra.text("Instrumentalizing transpiled JS...");
- var done = plugins.Q.defer();
- var stream = plugins.gulp.src([plugins.path.join(paths.cwd, "dist/*.js")])
- .pipe(plugins.g.istanbul()) // Covering files
- .pipe(plugins.g.istanbul.hookRequire()) // Force `require` to return covered files
- .pipe(plugins.g.gFunction(function () {
- plugins.beautylog.ok("JS has been instrumentalized to get test code coverage!");
- done.resolve(configArg);
- }, "atEnd"));
- return done.promise;
-};
-/**
- *
- * @returns {*}
- */
-var mocha = function (configArg) {
- var done = plugins.Q.defer();
- npmts_promisechain_1.npmtsOra.end(); // end npmtsOra for tests.
- var stream = plugins.gulp.src(["./test/test.js"])
- .pipe(plugins.g.mocha())
- .pipe(plugins.g.istanbul.writeReports()) // Creating the reports after tests ran
- .pipe(plugins.g.gFunction(function () {
- plugins.beautylog.ok("Tests have passed!");
- done.resolve(configArg);
- }, "atEnd"));
- return done.promise;
-};
-var coverage = function (configArg) {
- var done = plugins.Q.defer();
- plugins.smartcov.get.percentage(plugins.path.join(paths.coverageDir, "lcov.info"))
- .then(function (percentageArg) {
- if (percentageArg >= configArg.coverageTreshold) {
- plugins.beautylog.ok("your coverage of " + percentageArg.toString().blue + "% ".blue + "exceeds your treshold of " +
- configArg.coverageTreshold.toString().blue + "%".blue);
- }
- else {
- plugins.beautylog.warn("your coverage of " + percentageArg + "% " + "fails your treshold of " +
- configArg.coverageTreshold + "%");
- plugins.beautylog.error("exiting due to coverage failure");
- process.exit(1);
- }
- done.resolve(configArg);
- });
- return done.promise;
-};
-exports.run = function (configArg) {
- var done = plugins.Q.defer();
- var config = configArg;
- if (config.notest != true) {
- npmts_promisechain_1.npmtsOra.text("now starting tests");
- plugins.beautylog.log("-------------------------------------------------------\n" +
- "*************************** TESTS: ***************************\n" +
- "--------------------------------------------------------------");
- istanbul(config)
- .then(mocha)
- .then(coverage)
- .then(function () {
- done.resolve(config);
- });
- }
- else {
- npmts_promisechain_1.npmtsOra.end();
- done.resolve(config);
- }
- return done.promise;
-};