Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
e3b029c240 | |||
290824190d | |||
923d78caab | |||
6587b74a23 | |||
aa0a35f258 | |||
09b8809ede | |||
e25566490b | |||
3ed7473066 | |||
1202a68b01 | |||
c67d43e16d | |||
df74769533 | |||
5aef714497 | |||
24701afcb2 | |||
cbfbd4ee67 |
1
dist/npmts.cli.d.ts
vendored
1
dist/npmts.cli.d.ts
vendored
@ -1 +0,0 @@
|
|||||||
import "typings-global";
|
|
2
dist/npmts.cli.js
vendored
2
dist/npmts.cli.js
vendored
@ -1,2 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
require("typings-global");
|
|
2
dist/npmts.compile.js
vendored
2
dist/npmts.compile.js
vendored
@ -9,7 +9,7 @@ var compileTs = function (tsFileArrayArg, tsOptionsArg) {
|
|||||||
var done = plugins.Q.defer();
|
var done = plugins.Q.defer();
|
||||||
var tsOptionsDefault = {
|
var tsOptionsDefault = {
|
||||||
declaration: true,
|
declaration: true,
|
||||||
target: "ES5",
|
target: "ES6",
|
||||||
module: "commonjs"
|
module: "commonjs"
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
|
26
dist/npmts.jsdoc.js
vendored
26
dist/npmts.jsdoc.js
vendored
@ -1,26 +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 genEsDoc = function (configArg) {
|
|
||||||
var done = plugins.Q.defer();
|
|
||||||
npmts_promisechain_1.npmtsOra.text("now generating " + "EsDoc documentation".yellow);
|
|
||||||
plugins.beautylog.log("ESDoc Output:");
|
|
||||||
var esdocConfig = {
|
|
||||||
source: paths.distDir,
|
|
||||||
destination: paths.docsDir
|
|
||||||
};
|
|
||||||
plugins.esdoc.generate(esdocConfig, plugins.esdocPublisher);
|
|
||||||
plugins.beautylog.ok("Docs by EsDoc have been created!");
|
|
||||||
done.resolve(configArg);
|
|
||||||
return done.promise;
|
|
||||||
};
|
|
||||||
exports.run = function (configArg) {
|
|
||||||
var done = plugins.Q.defer();
|
|
||||||
genEsDoc(configArg)
|
|
||||||
.then(function () {
|
|
||||||
done.resolve(configArg);
|
|
||||||
});
|
|
||||||
return done.promise;
|
|
||||||
};
|
|
8
dist/npmts.plugins.d.ts
vendored
8
dist/npmts.plugins.d.ts
vendored
@ -1,15 +1,17 @@
|
|||||||
import "typings-global";
|
import "typings-global";
|
||||||
export import beautylog = require("beautylog");
|
export import beautylog = require("beautylog");
|
||||||
export declare let esdoc: any;
|
|
||||||
export declare let esdocPublisher: any;
|
|
||||||
export declare let gulp: any;
|
export declare let gulp: any;
|
||||||
export declare let g: {
|
export declare let g: {
|
||||||
gFunction: any;
|
babel: any;
|
||||||
istanbul: any;
|
istanbul: any;
|
||||||
|
gFunction: any;
|
||||||
|
injectModules: any;
|
||||||
mocha: any;
|
mocha: any;
|
||||||
replace: any;
|
replace: any;
|
||||||
sourcemaps: any;
|
sourcemaps: any;
|
||||||
|
typedoc: any;
|
||||||
};
|
};
|
||||||
|
import "babel-preset-es2015";
|
||||||
export declare let lodashObject: any;
|
export declare let lodashObject: any;
|
||||||
export declare let merge2: any;
|
export declare let merge2: any;
|
||||||
export import projectinfo = require("projectinfo");
|
export import projectinfo = require("projectinfo");
|
||||||
|
10
dist/npmts.plugins.js
vendored
10
dist/npmts.plugins.js
vendored
@ -1,16 +1,18 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
require("typings-global");
|
require("typings-global");
|
||||||
exports.beautylog = require("beautylog");
|
exports.beautylog = require("beautylog");
|
||||||
exports.esdoc = require("esdoc");
|
|
||||||
exports.esdocPublisher = require("esdoc/out/src/Publisher/publish");
|
|
||||||
exports.gulp = require("gulp");
|
exports.gulp = require("gulp");
|
||||||
exports.g = {
|
exports.g = {
|
||||||
gFunction: require("gulp-function"),
|
babel: require("gulp-babel"),
|
||||||
istanbul: require("gulp-istanbul"),
|
istanbul: require("gulp-istanbul"),
|
||||||
|
gFunction: require("gulp-function"),
|
||||||
|
injectModules: require("gulp-inject-modules"),
|
||||||
mocha: require("gulp-mocha"),
|
mocha: require("gulp-mocha"),
|
||||||
replace: require("gulp-replace"),
|
replace: require("gulp-replace"),
|
||||||
sourcemaps: require("gulp-sourcemaps")
|
sourcemaps: require("gulp-sourcemaps"),
|
||||||
|
typedoc: require("gulp-typedoc")
|
||||||
};
|
};
|
||||||
|
require("babel-preset-es2015");
|
||||||
exports.lodashObject = require('lodash/fp/object');
|
exports.lodashObject = require('lodash/fp/object');
|
||||||
exports.merge2 = require("merge2");
|
exports.merge2 = require("merge2");
|
||||||
exports.projectinfo = require("projectinfo");
|
exports.projectinfo = require("projectinfo");
|
||||||
|
4
dist/npmts.promisechain.js
vendored
4
dist/npmts.promisechain.js
vendored
@ -6,7 +6,7 @@ var NpmtsAssets = require("./npmts.assets");
|
|||||||
var NpmtsClean = require("./npmts.clean");
|
var NpmtsClean = require("./npmts.clean");
|
||||||
var NpmtsCompile = require("./npmts.compile");
|
var NpmtsCompile = require("./npmts.compile");
|
||||||
var NpmtsConfigFile = require("./npmts.configfile");
|
var NpmtsConfigFile = require("./npmts.configfile");
|
||||||
var NpmtsJsdoc = require("./npmts.jsdoc");
|
var NpmtsTypeDoc = require("./npmts.typedoc");
|
||||||
var NpmtsOptions = require("./npmts.options");
|
var NpmtsOptions = require("./npmts.options");
|
||||||
var NpmtsTests = require("./npmts.tests");
|
var NpmtsTests = require("./npmts.tests");
|
||||||
exports.promisechain = function (argvArg) {
|
exports.promisechain = function (argvArg) {
|
||||||
@ -17,7 +17,7 @@ exports.promisechain = function (argvArg) {
|
|||||||
.then(NpmtsClean.run)
|
.then(NpmtsClean.run)
|
||||||
.then(NpmtsCompile.run)
|
.then(NpmtsCompile.run)
|
||||||
.then(NpmtsAssets.run)
|
.then(NpmtsAssets.run)
|
||||||
.then(NpmtsJsdoc.run)
|
.then(NpmtsTypeDoc.run)
|
||||||
.then(NpmtsTests.run)
|
.then(NpmtsTests.run)
|
||||||
.then(function (configArg) {
|
.then(function (configArg) {
|
||||||
var shipString = "" +
|
var shipString = "" +
|
||||||
|
48
dist/npmts.tests.js
vendored
48
dist/npmts.tests.js
vendored
@ -7,34 +7,31 @@ var npmts_promisechain_1 = require("./npmts.promisechain");
|
|||||||
*
|
*
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
var istanbul = function (configArg) {
|
var mocha = function (configArg) {
|
||||||
npmts_promisechain_1.npmtsOra.text("Instrumentalizing transpiled JS...");
|
npmts_promisechain_1.npmtsOra.text("Instrumentalizing and testing transpiled JS");
|
||||||
|
npmts_promisechain_1.npmtsOra.end(); // end npmtsOra for tests.
|
||||||
var done = plugins.Q.defer();
|
var done = plugins.Q.defer();
|
||||||
var stream = plugins.gulp.src([plugins.path.join(paths.cwd, "dist/*.js")])
|
var stream = plugins.gulp.src([plugins.path.join(paths.cwd, "dist/*.js")])
|
||||||
.pipe(plugins.g.sourcemaps.init())
|
.pipe(plugins.g.sourcemaps.init())
|
||||||
.pipe(plugins.g.istanbul()) // Covering files
|
.pipe(plugins.g.babel({
|
||||||
|
presets: ['es2015']
|
||||||
|
}))
|
||||||
|
.pipe(plugins.g.istanbul())
|
||||||
.pipe(plugins.g.sourcemaps.write())
|
.pipe(plugins.g.sourcemaps.write())
|
||||||
.pipe(plugins.g.istanbul.hookRequire()) // Force `require` to return covered files
|
.pipe(plugins.g.injectModules())
|
||||||
.pipe(plugins.g.gFunction(function () {
|
.on("finish", function () {
|
||||||
plugins.beautylog.ok("JS has been instrumentalized to get test code coverage!");
|
plugins.gulp.src([plugins.path.join(paths.cwd, "test/test.js")])
|
||||||
done.resolve(configArg);
|
.pipe(plugins.g.babel({
|
||||||
}, "atEnd"));
|
presets: ['es2015']
|
||||||
return done.promise;
|
}))
|
||||||
};
|
.pipe(plugins.g.injectModules())
|
||||||
/**
|
.pipe(plugins.g.mocha())
|
||||||
*
|
.pipe(plugins.g.istanbul.writeReports())
|
||||||
* @returns {*}
|
.pipe(plugins.g.gFunction(function () {
|
||||||
*/
|
plugins.beautylog.ok("Tested!");
|
||||||
var mocha = function (configArg) {
|
done.resolve(configArg);
|
||||||
var done = plugins.Q.defer();
|
}, "atEnd"));
|
||||||
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;
|
return done.promise;
|
||||||
};
|
};
|
||||||
var coverage = function (configArg) {
|
var coverage = function (configArg) {
|
||||||
@ -63,8 +60,7 @@ exports.run = function (configArg) {
|
|||||||
plugins.beautylog.log("-------------------------------------------------------\n" +
|
plugins.beautylog.log("-------------------------------------------------------\n" +
|
||||||
"*************************** TESTS: ***************************\n" +
|
"*************************** TESTS: ***************************\n" +
|
||||||
"--------------------------------------------------------------");
|
"--------------------------------------------------------------");
|
||||||
istanbul(config)
|
mocha(config)
|
||||||
.then(mocha)
|
|
||||||
.then(coverage)
|
.then(coverage)
|
||||||
.then(function () {
|
.then(function () {
|
||||||
done.resolve(config);
|
done.resolve(config);
|
||||||
|
35
dist/npmts.typedoc.js
vendored
Normal file
35
dist/npmts.typedoc.js
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
"use strict";
|
||||||
|
require("typings-global");
|
||||||
|
var plugins = require("./npmts.plugins");
|
||||||
|
var paths = require("./npmts.paths");
|
||||||
|
var npmts_promisechain_1 = require("./npmts.promisechain");
|
||||||
|
var genTypeDoc = function (configArg) {
|
||||||
|
var done = plugins.Q.defer();
|
||||||
|
npmts_promisechain_1.npmtsOra.text("now generating " + "TypeDoc documentation".yellow);
|
||||||
|
plugins.beautylog.log("TypeDoc Output:");
|
||||||
|
plugins.gulp.src(plugins.path.join(paths.tsDir, "**/*.ts"))
|
||||||
|
.pipe(plugins.g.typedoc({
|
||||||
|
// TypeScript options (see typescript docs)
|
||||||
|
module: "commonjs",
|
||||||
|
target: "es6",
|
||||||
|
includeDeclarations: true,
|
||||||
|
// Output options (see typedoc docs)
|
||||||
|
out: paths.docsDir,
|
||||||
|
json: plugins.path.join(paths.docsDir, "file.json"),
|
||||||
|
// TypeDoc options (see typedoc docs)
|
||||||
|
name: "my-project",
|
||||||
|
//theme: "default",
|
||||||
|
ignoreCompilerErrors: true,
|
||||||
|
version: true,
|
||||||
|
}))
|
||||||
|
.pipe(plugins.g.gFunction(done.resolve, "atEnd"));
|
||||||
|
return done.promise;
|
||||||
|
};
|
||||||
|
exports.run = function (configArg) {
|
||||||
|
var done = plugins.Q.defer();
|
||||||
|
genTypeDoc(configArg)
|
||||||
|
.then(function () {
|
||||||
|
done.resolve(configArg);
|
||||||
|
});
|
||||||
|
return done.promise;
|
||||||
|
};
|
30
npm-debug.log
Normal file
30
npm-debug.log
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
0 info it worked if it ends with ok
|
||||||
|
1 verbose cli [ '/Users/philkunz/.nvm/versions/node/v4.4.5/bin/node',
|
||||||
|
1 verbose cli '/Users/philkunz/.nvm/versions/node/v4.4.5/bin/npm',
|
||||||
|
1 verbose cli 'version',
|
||||||
|
1 verbose cli 'patch' ]
|
||||||
|
2 info using npm@3.10.3
|
||||||
|
3 info using node@v4.4.5
|
||||||
|
4 info git [ 'status', '--porcelain' ]
|
||||||
|
5 verbose stack Error: Git working directory not clean.
|
||||||
|
5 verbose stack M package.json
|
||||||
|
5 verbose stack at /Users/philkunz/.nvm/versions/node/v4.4.5/lib/node_modules/npm/lib/version.js:247:19
|
||||||
|
5 verbose stack at /Users/philkunz/.nvm/versions/node/v4.4.5/lib/node_modules/npm/lib/utils/no-progress-while-running.js:21:8
|
||||||
|
5 verbose stack at ChildProcess.exithandler (child_process.js:204:7)
|
||||||
|
5 verbose stack at emitTwo (events.js:87:13)
|
||||||
|
5 verbose stack at ChildProcess.emit (events.js:172:7)
|
||||||
|
5 verbose stack at maybeClose (internal/child_process.js:827:16)
|
||||||
|
5 verbose stack at Socket.<anonymous> (internal/child_process.js:319:11)
|
||||||
|
5 verbose stack at emitOne (events.js:77:13)
|
||||||
|
5 verbose stack at Socket.emit (events.js:169:7)
|
||||||
|
5 verbose stack at Pipe._onclose (net.js:477:12)
|
||||||
|
6 verbose cwd /Users/philkunz/gitlab/pushrocks/npmts
|
||||||
|
7 error Darwin 15.5.0
|
||||||
|
8 error argv "/Users/philkunz/.nvm/versions/node/v4.4.5/bin/node" "/Users/philkunz/.nvm/versions/node/v4.4.5/bin/npm" "version" "patch"
|
||||||
|
9 error node v4.4.5
|
||||||
|
10 error npm v3.10.3
|
||||||
|
11 error Git working directory not clean.
|
||||||
|
11 error M package.json
|
||||||
|
12 error If you need help, you may report this error at:
|
||||||
|
12 error <https://github.com/npm/npm/issues>
|
||||||
|
13 verbose exit [ 1, true ]
|
22
package.json
22
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "npmts",
|
"name": "npmts",
|
||||||
"version": "5.3.11",
|
"version": "5.3.17",
|
||||||
"description": "write npm modules with TypeScript",
|
"description": "write npm modules with TypeScript",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
@ -29,23 +29,24 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://gitlab.com/pushrocks/npmts#readme",
|
"homepage": "https://gitlab.com/pushrocks/npmts#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/minimatch": "^2.0.27-alpha",
|
"@types/minimatch": "*",
|
||||||
"@types/q": "0.0.26-alpha",
|
"@types/q": "*",
|
||||||
"@types/shelljs": "^0.3.26-alpha",
|
"@types/shelljs": "*",
|
||||||
"beautylog": "5.0.13",
|
"babel-preset-es2015": "^6.9.0",
|
||||||
|
"beautylog": "5.0.14",
|
||||||
"early": "^2.0.13",
|
"early": "^2.0.13",
|
||||||
"esdoc": "^0.4.7",
|
|
||||||
"gulp": "3.9.1",
|
"gulp": "3.9.1",
|
||||||
|
"gulp-babel": "^6.1.2",
|
||||||
"gulp-concat": "^2.6.0",
|
"gulp-concat": "^2.6.0",
|
||||||
"gulp-function": "^1.3.6",
|
"gulp-function": "^1.3.6",
|
||||||
"gulp-if": "^2.0.1",
|
"gulp-if": "^2.0.1",
|
||||||
|
"gulp-inject-modules": "^1.0.0",
|
||||||
"gulp-istanbul": "^1.0.0",
|
"gulp-istanbul": "^1.0.0",
|
||||||
"gulp-jsdoc3": "^0.3.0",
|
|
||||||
"gulp-mocha": "^2.2.0",
|
"gulp-mocha": "^2.2.0",
|
||||||
"gulp-replace": "^0.5.4",
|
"gulp-replace": "^0.5.4",
|
||||||
"gulp-sourcemaps": "^1.6.0",
|
"gulp-sourcemaps": "^1.6.0",
|
||||||
|
"gulp-typedoc": "^2.0.0",
|
||||||
"lodash": "^4.13.1",
|
"lodash": "^4.13.1",
|
||||||
"merge2": "1.0.2",
|
|
||||||
"projectinfo": "1.0.3",
|
"projectinfo": "1.0.3",
|
||||||
"q": "^1.4.1",
|
"q": "^1.4.1",
|
||||||
"shelljs": "^0.7.0",
|
"shelljs": "^0.7.0",
|
||||||
@ -56,8 +57,9 @@
|
|||||||
"smartfile": "4.0.10",
|
"smartfile": "4.0.10",
|
||||||
"smartpath": "3.2.2",
|
"smartpath": "3.2.2",
|
||||||
"smartstring": "^2.0.14",
|
"smartstring": "^2.0.14",
|
||||||
"source-map-support": "^0.4.1",
|
"source-map-support": "^0.4.2",
|
||||||
"tsn": "^1.0.6",
|
"tsn": "^1.0.7",
|
||||||
|
"typedoc": "^0.4.4",
|
||||||
"typescript": "^2.0.0-dev.20160630",
|
"typescript": "^2.0.0-dev.20160630",
|
||||||
"typings-global": "*"
|
"typings-global": "*"
|
||||||
},
|
},
|
||||||
|
@ -1 +0,0 @@
|
|||||||
import "typings-global";
|
|
@ -10,7 +10,7 @@ let compileTs = (tsFileArrayArg:string[],tsOptionsArg = {}) => {
|
|||||||
|
|
||||||
let tsOptionsDefault = {
|
let tsOptionsDefault = {
|
||||||
declaration: true,
|
declaration: true,
|
||||||
target: "ES5",
|
target: "ES6",
|
||||||
module: "commonjs"
|
module: "commonjs"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
import "typings-global";
|
|
||||||
import plugins = require("./npmts.plugins");
|
|
||||||
import paths = require("./npmts.paths");
|
|
||||||
import {npmtsOra} from "./npmts.promisechain";
|
|
||||||
|
|
||||||
let genEsDoc = function(configArg){
|
|
||||||
let done = plugins.Q.defer();
|
|
||||||
npmtsOra.text("now generating " + "EsDoc documentation".yellow);
|
|
||||||
plugins.beautylog.log("ESDoc Output:");
|
|
||||||
let esdocConfig = {
|
|
||||||
source: paths.distDir,
|
|
||||||
destination: paths.docsDir
|
|
||||||
};
|
|
||||||
plugins.esdoc.generate(esdocConfig,plugins.esdocPublisher);
|
|
||||||
plugins.beautylog.ok("Docs by EsDoc have been created!");
|
|
||||||
done.resolve(configArg);
|
|
||||||
return done.promise;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
export let run = function(configArg){
|
|
||||||
let done = plugins.Q.defer();
|
|
||||||
genEsDoc(configArg)
|
|
||||||
.then(() => {
|
|
||||||
done.resolve(configArg);
|
|
||||||
});
|
|
||||||
return done.promise;
|
|
||||||
};
|
|
@ -1,15 +1,17 @@
|
|||||||
import "typings-global";
|
import "typings-global";
|
||||||
export import beautylog = require("beautylog");
|
export import beautylog = require("beautylog");
|
||||||
export let esdoc = require("esdoc");
|
|
||||||
export let esdocPublisher = require("esdoc/out/src/Publisher/publish");
|
|
||||||
export let gulp = require("gulp");
|
export let gulp = require("gulp");
|
||||||
export let g = {
|
export let g = {
|
||||||
gFunction: require("gulp-function"),
|
babel: require("gulp-babel"),
|
||||||
istanbul: require("gulp-istanbul"),
|
istanbul: require("gulp-istanbul"),
|
||||||
|
gFunction: require("gulp-function"),
|
||||||
|
injectModules: require("gulp-inject-modules"),
|
||||||
mocha: require("gulp-mocha"),
|
mocha: require("gulp-mocha"),
|
||||||
replace: require("gulp-replace"),
|
replace: require("gulp-replace"),
|
||||||
sourcemaps: require("gulp-sourcemaps")
|
sourcemaps: require("gulp-sourcemaps"),
|
||||||
|
typedoc: require("gulp-typedoc")
|
||||||
};
|
};
|
||||||
|
import "babel-preset-es2015";
|
||||||
export let lodashObject = require('lodash/fp/object');
|
export let lodashObject = require('lodash/fp/object');
|
||||||
export let merge2 = require("merge2");
|
export let merge2 = require("merge2");
|
||||||
export import projectinfo = require("projectinfo");
|
export import projectinfo = require("projectinfo");
|
||||||
|
@ -8,7 +8,7 @@ import NpmtsAssets = require("./npmts.assets");
|
|||||||
import NpmtsClean = require("./npmts.clean");
|
import NpmtsClean = require("./npmts.clean");
|
||||||
import NpmtsCompile = require("./npmts.compile");
|
import NpmtsCompile = require("./npmts.compile");
|
||||||
import NpmtsConfigFile = require("./npmts.configfile");
|
import NpmtsConfigFile = require("./npmts.configfile");
|
||||||
import NpmtsJsdoc = require("./npmts.jsdoc");
|
import NpmtsTypeDoc = require("./npmts.typedoc");
|
||||||
import NpmtsOptions = require("./npmts.options");
|
import NpmtsOptions = require("./npmts.options");
|
||||||
import NpmtsTests = require("./npmts.tests");
|
import NpmtsTests = require("./npmts.tests");
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ export let promisechain = function(argvArg){
|
|||||||
.then(NpmtsClean.run)
|
.then(NpmtsClean.run)
|
||||||
.then(NpmtsCompile.run)
|
.then(NpmtsCompile.run)
|
||||||
.then(NpmtsAssets.run)
|
.then(NpmtsAssets.run)
|
||||||
.then(NpmtsJsdoc.run)
|
.then(NpmtsTypeDoc.run)
|
||||||
.then(NpmtsTests.run)
|
.then(NpmtsTests.run)
|
||||||
.then(function(configArg){
|
.then(function(configArg){
|
||||||
let shipString = "" +
|
let shipString = "" +
|
||||||
|
@ -7,35 +7,31 @@ import {npmtsOra} from "./npmts.promisechain";
|
|||||||
*
|
*
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
let istanbul = function (configArg) {
|
let mocha = function (configArg) {
|
||||||
npmtsOra.text("Instrumentalizing transpiled JS...");
|
npmtsOra.text("Instrumentalizing and testing transpiled JS");
|
||||||
|
npmtsOra.end(); // end npmtsOra for tests.
|
||||||
let done = plugins.Q.defer();
|
let done = plugins.Q.defer();
|
||||||
var stream = plugins.gulp.src([plugins.path.join(paths.cwd,"dist/*.js")])
|
var stream = plugins.gulp.src([plugins.path.join(paths.cwd,"dist/*.js")])
|
||||||
.pipe(plugins.g.sourcemaps.init())
|
.pipe(plugins.g.sourcemaps.init())
|
||||||
.pipe(plugins.g.istanbul()) // Covering files
|
.pipe(plugins.g.babel({
|
||||||
|
presets: ['es2015']
|
||||||
|
}))
|
||||||
|
.pipe(plugins.g.istanbul())
|
||||||
.pipe(plugins.g.sourcemaps.write())
|
.pipe(plugins.g.sourcemaps.write())
|
||||||
.pipe(plugins.g.istanbul.hookRequire()) // Force `require` to return covered files
|
.pipe(plugins.g.injectModules())
|
||||||
.pipe(plugins.g.gFunction(function(){
|
.on("finish",function(){
|
||||||
plugins.beautylog.ok("JS has been instrumentalized to get test code coverage!");
|
plugins.gulp.src([plugins.path.join(paths.cwd,"test/test.js")])
|
||||||
done.resolve(configArg);
|
.pipe(plugins.g.babel({
|
||||||
},"atEnd"));
|
presets: ['es2015']
|
||||||
return done.promise;
|
}))
|
||||||
};
|
.pipe(plugins.g.injectModules())
|
||||||
|
.pipe(plugins.g.mocha())
|
||||||
/**
|
.pipe(plugins.g.istanbul.writeReports())
|
||||||
*
|
.pipe(plugins.g.gFunction(function(){
|
||||||
* @returns {*}
|
plugins.beautylog.ok("Tested!");
|
||||||
*/
|
done.resolve(configArg);
|
||||||
let mocha = function (configArg) {
|
},"atEnd"));
|
||||||
let done = plugins.Q.defer();
|
});
|
||||||
npmtsOra.end(); // end npmtsOra for tests.
|
|
||||||
let 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;
|
return done.promise;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -72,8 +68,7 @@ export let run = function(configArg) {
|
|||||||
"--------------------------------------------------------------"
|
"--------------------------------------------------------------"
|
||||||
);
|
);
|
||||||
|
|
||||||
istanbul(config)
|
mocha(config)
|
||||||
.then(mocha)
|
|
||||||
.then(coverage)
|
.then(coverage)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
done.resolve(config);
|
done.resolve(config);
|
||||||
|
40
ts/npmts.typedoc.ts
Normal file
40
ts/npmts.typedoc.ts
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
import "typings-global";
|
||||||
|
import plugins = require("./npmts.plugins");
|
||||||
|
import paths = require("./npmts.paths");
|
||||||
|
import {npmtsOra} from "./npmts.promisechain";
|
||||||
|
|
||||||
|
let genTypeDoc = function(configArg){
|
||||||
|
let done = plugins.Q.defer();
|
||||||
|
npmtsOra.text("now generating " + "TypeDoc documentation".yellow);
|
||||||
|
plugins.beautylog.log("TypeDoc Output:");
|
||||||
|
plugins.gulp.src(plugins.path.join(paths.tsDir,"**/*.ts"))
|
||||||
|
.pipe(plugins.g.typedoc({
|
||||||
|
// TypeScript options (see typescript docs)
|
||||||
|
module: "commonjs",
|
||||||
|
target: "es6",
|
||||||
|
includeDeclarations: true,
|
||||||
|
|
||||||
|
// Output options (see typedoc docs)
|
||||||
|
out: paths.docsDir,
|
||||||
|
json: plugins.path.join(paths.docsDir,"file.json"),
|
||||||
|
|
||||||
|
// TypeDoc options (see typedoc docs)
|
||||||
|
name: "my-project",
|
||||||
|
|
||||||
|
//theme: "default",
|
||||||
|
ignoreCompilerErrors: true,
|
||||||
|
version: true,
|
||||||
|
}))
|
||||||
|
.pipe(plugins.g.gFunction(done.resolve,"atEnd"));
|
||||||
|
return done.promise;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export let run = function(configArg){
|
||||||
|
let done = plugins.Q.defer();
|
||||||
|
genTypeDoc(configArg)
|
||||||
|
.then(() => {
|
||||||
|
done.resolve(configArg);
|
||||||
|
});
|
||||||
|
return done.promise;
|
||||||
|
};
|
Reference in New Issue
Block a user