Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
94f48afbbd | |||
944e9b227c | |||
b83aaf4abf | |||
51a1dd0b1d | |||
dd9df9f5ee | |||
c109952a22 | |||
b14c79f6ef | |||
66ad3aeeb9 | |||
a6e91c6a7f |
4
dist/index.js
vendored
4
dist/index.js
vendored
@ -1,8 +1,10 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
/// <reference path="./typings/index.d.ts" />
|
/// <reference path="./typings/index.d.ts" />
|
||||||
console.log("**** starting NPMTS ****");
|
var early = require("early");
|
||||||
|
early.start("NPMTS");
|
||||||
var plugins = require("./npmts.plugins");
|
var plugins = require("./npmts.plugins");
|
||||||
var npmts_promisechain_1 = require("./npmts.promisechain");
|
var npmts_promisechain_1 = require("./npmts.promisechain");
|
||||||
|
early.stop();
|
||||||
plugins.beautylog.figletSync("NPMTS");
|
plugins.beautylog.figletSync("NPMTS");
|
||||||
try {
|
try {
|
||||||
npmts_promisechain_1.promisechain();
|
npmts_promisechain_1.promisechain();
|
||||||
|
8
dist/npmts.clean.js
vendored
8
dist/npmts.clean.js
vendored
@ -8,8 +8,14 @@ var removeDist = function () {
|
|||||||
return plugins.smartfile.fsaction.remove(paths.distDir);
|
return plugins.smartfile.fsaction.remove(paths.distDir);
|
||||||
};
|
};
|
||||||
var removeTypings = function () {
|
var removeTypings = function () {
|
||||||
|
var done = plugins.Q.defer();
|
||||||
npmts_promisechain_1.npmtsOra.text("cleaning " + "typings".yellow + " folder");
|
npmts_promisechain_1.npmtsOra.text("cleaning " + "typings".yellow + " folder");
|
||||||
return plugins.smartfile.fsaction.remove(paths.typingsDir);
|
if (false) {
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
done.resolve();
|
||||||
|
}
|
||||||
|
return done.promise;
|
||||||
};
|
};
|
||||||
exports.run = function (configArg) {
|
exports.run = function (configArg) {
|
||||||
npmts_promisechain_1.npmtsOra.text("cleaning up from previous builds...");
|
npmts_promisechain_1.npmtsOra.text("cleaning up from previous builds...");
|
||||||
|
1
dist/npmts.promisechain.js
vendored
1
dist/npmts.promisechain.js
vendored
@ -43,7 +43,6 @@ exports.promisechain = function () {
|
|||||||
plugins.beautylog.success("READY TO SHIP!");
|
plugins.beautylog.success("READY TO SHIP!");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
exports.npmtsOra.endOk("Tasks finished!");
|
|
||||||
plugins.beautylog.success("Done!");
|
plugins.beautylog.success("Done!");
|
||||||
}
|
}
|
||||||
done.resolve();
|
done.resolve();
|
||||||
|
3
dist/npmts.tests.js
vendored
3
dist/npmts.tests.js
vendored
@ -19,11 +19,13 @@ exports.publishCoverage = function (configArg) {
|
|||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
var istanbul = function (configArg) {
|
var istanbul = function (configArg) {
|
||||||
|
npmts_promisechain_1.npmtsOra.text("Instrumentalizing transpiled JS...");
|
||||||
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.istanbul()) // Covering files
|
.pipe(plugins.g.istanbul()) // Covering files
|
||||||
.pipe(plugins.g.istanbul.hookRequire()) // Force `require` to return covered files
|
.pipe(plugins.g.istanbul.hookRequire()) // Force `require` to return covered files
|
||||||
.pipe(plugins.g.gFunction(function () {
|
.pipe(plugins.g.gFunction(function () {
|
||||||
|
plugins.beautylog.ok("JS has been instrumentalized to get test code coverage!");
|
||||||
done.resolve(configArg);
|
done.resolve(configArg);
|
||||||
}, "atEnd"));
|
}, "atEnd"));
|
||||||
return done.promise;
|
return done.promise;
|
||||||
@ -34,6 +36,7 @@ var istanbul = function (configArg) {
|
|||||||
*/
|
*/
|
||||||
var mocha = function (configArg) {
|
var mocha = function (configArg) {
|
||||||
var done = plugins.Q.defer();
|
var done = plugins.Q.defer();
|
||||||
|
npmts_promisechain_1.npmtsOra.end(); // end npmtsOra for tests.
|
||||||
var stream = plugins.gulp.src(["./test/test.js"])
|
var stream = plugins.gulp.src(["./test/test.js"])
|
||||||
.pipe(plugins.g.mocha())
|
.pipe(plugins.g.mocha())
|
||||||
.pipe(plugins.g.istanbul.writeReports()) // Creating the reports after tests ran
|
.pipe(plugins.g.istanbul.writeReports()) // Creating the reports after tests ran
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "npmts",
|
"name": "npmts",
|
||||||
"version": "5.1.8",
|
"version": "5.1.13",
|
||||||
"description": "write npm modules with TypeScript",
|
"description": "write npm modules with TypeScript",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
@ -26,7 +26,8 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/pushrocks/npmts#readme",
|
"homepage": "https://github.com/pushrocks/npmts#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"beautylog": "5.0.4",
|
"beautylog": "5.0.5",
|
||||||
|
"early": "^2.0.1",
|
||||||
"fs-extra": "^0.30.0",
|
"fs-extra": "^0.30.0",
|
||||||
"gulp": "3.9.1",
|
"gulp": "3.9.1",
|
||||||
"gulp-codecov": "^2.0.1",
|
"gulp-codecov": "^2.0.1",
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
/// <reference path="./typings/index.d.ts" />
|
/// <reference path="./typings/index.d.ts" />
|
||||||
console.log("**** starting NPMTS ****");
|
import * as early from "early";
|
||||||
|
early.start("NPMTS");
|
||||||
import * as plugins from "./npmts.plugins"
|
import * as plugins from "./npmts.plugins"
|
||||||
import {promisechain} from "./npmts.promisechain";
|
import {promisechain} from "./npmts.promisechain";
|
||||||
|
early.stop();
|
||||||
|
|
||||||
plugins.beautylog.figletSync("NPMTS");
|
plugins.beautylog.figletSync("NPMTS");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -9,8 +9,15 @@ let removeDist = function(){
|
|||||||
};
|
};
|
||||||
|
|
||||||
let removeTypings = function(){
|
let removeTypings = function(){
|
||||||
|
let done = plugins.Q.defer();
|
||||||
npmtsOra.text("cleaning " + "typings".yellow + " folder");
|
npmtsOra.text("cleaning " + "typings".yellow + " folder");
|
||||||
return plugins.smartfile.fsaction.remove(paths.typingsDir);
|
if(false){
|
||||||
|
//plugins.smartfile.fsaction.remove(paths.typingsDir)
|
||||||
|
// .then(done.resolve);
|
||||||
|
} else {
|
||||||
|
done.resolve();
|
||||||
|
}
|
||||||
|
return done.promise;
|
||||||
};
|
};
|
||||||
|
|
||||||
export let run = function(configArg){
|
export let run = function(configArg){
|
||||||
|
@ -44,7 +44,6 @@ export let promisechain = function(){
|
|||||||
console.log(shipString);
|
console.log(shipString);
|
||||||
plugins.beautylog.success("READY TO SHIP!");
|
plugins.beautylog.success("READY TO SHIP!");
|
||||||
} else {
|
} else {
|
||||||
npmtsOra.endOk("Tasks finished!");
|
|
||||||
plugins.beautylog.success("Done!");
|
plugins.beautylog.success("Done!");
|
||||||
}
|
}
|
||||||
done.resolve();
|
done.resolve();
|
||||||
|
@ -20,11 +20,13 @@ export let publishCoverage = function(configArg){
|
|||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
let istanbul = function (configArg) {
|
let istanbul = function (configArg) {
|
||||||
|
npmtsOra.text("Instrumentalizing transpiled JS...");
|
||||||
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.istanbul()) // Covering files
|
.pipe(plugins.g.istanbul()) // Covering files
|
||||||
.pipe(plugins.g.istanbul.hookRequire()) // Force `require` to return covered files
|
.pipe(plugins.g.istanbul.hookRequire()) // Force `require` to return covered files
|
||||||
.pipe(plugins.g.gFunction(function(){
|
.pipe(plugins.g.gFunction(function(){
|
||||||
|
plugins.beautylog.ok("JS has been instrumentalized to get test code coverage!");
|
||||||
done.resolve(configArg);
|
done.resolve(configArg);
|
||||||
},"atEnd"));
|
},"atEnd"));
|
||||||
return done.promise;
|
return done.promise;
|
||||||
@ -36,6 +38,7 @@ let istanbul = function (configArg) {
|
|||||||
*/
|
*/
|
||||||
let mocha = function (configArg) {
|
let mocha = function (configArg) {
|
||||||
let done = plugins.Q.defer();
|
let done = plugins.Q.defer();
|
||||||
|
npmtsOra.end(); // end npmtsOra for tests.
|
||||||
let stream = plugins.gulp.src(["./test/test.js"])
|
let stream = plugins.gulp.src(["./test/test.js"])
|
||||||
.pipe(plugins.g.mocha())
|
.pipe(plugins.g.mocha())
|
||||||
.pipe(plugins.g.istanbul.writeReports()) // Creating the reports after tests ran
|
.pipe(plugins.g.istanbul.writeReports()) // Creating the reports after tests ran
|
||||||
|
Reference in New Issue
Block a user