now uses beautylog.ora

This commit is contained in:
Philipp Kunz 2016-05-17 02:32:40 +02:00
parent e75de7590e
commit 3f261a4fa6
20 changed files with 65 additions and 47 deletions

View File

@ -2,13 +2,14 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />
var plugins = require("./npmts.plugins"); var plugins = require("./npmts.plugins");
var paths = require("./npmts.paths"); var paths = require("./npmts.paths");
var npmts_promisechain_1 = require("./npmts.promisechain");
exports.run = function (configArg) { exports.run = function (configArg) {
var done = plugins.Q.defer(); var done = plugins.Q.defer();
var config = configArg; var config = configArg;
plugins.beautylog.log("now looking at required assets"); npmts_promisechain_1.npmtsOra.text("now looking at required assets");
if (config.cli == true) { if (config.cli == true) {
plugins.smartfile.fsaction.copy(plugins.path.join(paths.npmtsAssetsDir, "cli.js"), paths.distDir); plugins.smartfile.fsaction.copy(plugins.path.join(paths.npmtsAssetsDir, "cli.js"), paths.distDir);
plugins.beautylog.ok("CLI asset has been installed!"); plugins.beautylog.ok("installed CLI assets!");
done.resolve(config); done.resolve(config);
} }
else { else {

5
dist/npmts.clean.js vendored
View File

@ -2,12 +2,13 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />
var plugins = require("./npmts.plugins"); var plugins = require("./npmts.plugins");
var paths = require("./npmts.paths"); var paths = require("./npmts.paths");
var npmts_promisechain_1 = require("./npmts.promisechain");
exports.run = function (configArg) { exports.run = function (configArg) {
plugins.beautylog.log("now cleaning up from previous builds..."); npmts_promisechain_1.npmtsOra.text("cleaning up from previous builds...");
var done = plugins.Q.defer(); var done = plugins.Q.defer();
plugins.smartfile.fsaction.remove(paths.distDir) plugins.smartfile.fsaction.remove(paths.distDir)
.then(function () { .then(function () {
plugins.beautylog.ok("Cleaned up!"); plugins.beautylog.ok("Cleaned up from previous builds!");
done.resolve(configArg); done.resolve(configArg);
}); });
return done.promise; return done.promise;

View File

@ -3,11 +3,12 @@
var plugins = require("./npmts.plugins"); var plugins = require("./npmts.plugins");
var paths = require("./npmts.paths"); var paths = require("./npmts.paths");
var helpers = require("./npmts.compile.helpers"); var helpers = require("./npmts.compile.helpers");
var npmts_promisechain_1 = require("./npmts.promisechain");
/** /**
* handles definition to make them fit for modular use * handles definition to make them fit for modular use
*/ */
var definitionHandler = function (configArg) { var definitionHandler = function (configArg) {
plugins.beautylog.log("now making declaration files ready"); npmts_promisechain_1.npmtsOra.text("now making declaration files ready");
var done = plugins.Q.defer(); var done = plugins.Q.defer();
var configTsLenght = Object.keys(configArg.ts).length; var configTsLenght = Object.keys(configArg.ts).length;
if (configTsLenght == 0) { if (configTsLenght == 0) {
@ -23,7 +24,7 @@ var definitionHandler = function (configArg) {
.pipe(plugins.g.gFunction(function () { .pipe(plugins.g.gFunction(function () {
localCounter++; localCounter++;
if (localCounter == configTsLenght) { if (localCounter == configTsLenght) {
plugins.beautylog.ok("declaration files ready!!!"); plugins.beautylog.ok("made declaration files ready!");
done.resolve(configArg); done.resolve(configArg);
} }
; ;
@ -34,7 +35,7 @@ var definitionHandler = function (configArg) {
exports.run = function (configArg) { exports.run = function (configArg) {
var done = plugins.Q.defer(); var done = plugins.Q.defer();
var config = configArg; var config = configArg;
plugins.beautylog.log("now compiling " + "TypeScript".yellow); npmts_promisechain_1.npmtsOra.text("now compiling " + "TypeScript".yellow);
var moduleStream = plugins.merge2({ end: false }); var moduleStream = plugins.merge2({ end: false });
/* ------------------------------------------------- /* -------------------------------------------------
* ----------- compile TypeScript -------------------------- * ----------- compile TypeScript --------------------------
@ -65,7 +66,7 @@ exports.run = function (configArg) {
} }
moduleStream.on("queueDrain", function () { moduleStream.on("queueDrain", function () {
moduleStream.on("finish", function () { moduleStream.on("finish", function () {
plugins.beautylog.ok("TypeScript has been compiled!"); plugins.beautylog.ok("compiled TypeScript!");
definitionHandler(config) definitionHandler(config)
.then(function () { .then(function () {
done.resolve(config); done.resolve(config);

View File

@ -2,18 +2,19 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />
var plugins = require("./npmts.plugins"); var plugins = require("./npmts.plugins");
var paths = require("./npmts.paths"); var paths = require("./npmts.paths");
var npmts_promisechain_1 = require("./npmts.promisechain");
exports.run = function (configArg) { exports.run = function (configArg) {
var config = configArg; var config = configArg;
var done = plugins.Q.defer(); var done = plugins.Q.defer();
/* ------------------------------------------------- /* -------------------------------------------------
* ----------- install typings --------------- * ----------- install typings ---------------
* ----------------------------------------------- */ * ----------------------------------------------- */
plugins.beautylog.log("now installing " + "typings".yellow); npmts_promisechain_1.npmtsOra.text("now installing typings");
var absoluteTypingsArray = plugins.smartpath.transform.toAbsolute(config.typings, paths.cwd); var absoluteTypingsArray = plugins.smartpath.transform.toAbsolute(config.typings, paths.cwd);
plugins.gulp.src(absoluteTypingsArray) plugins.gulp.src(absoluteTypingsArray)
.pipe(plugins.g.typings()) .pipe(plugins.g.typings())
.pipe(plugins.g.gFunction(function () { .pipe(plugins.g.gFunction(function () {
plugins.beautylog.ok("typings have been installed!"); plugins.beautylog.ok("typings installed!");
done.resolve(config); done.resolve(config);
}, "atEnd")); }, "atEnd"));
return done.promise; return done.promise;

3
dist/npmts.jsdoc.js vendored
View File

@ -2,9 +2,10 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />
var plugins = require("./npmts.plugins"); var plugins = require("./npmts.plugins");
var paths = require("./npmts.paths"); var paths = require("./npmts.paths");
var npmts_promisechain_1 = require("./npmts.promisechain");
var genJsdoc = function (configArg) { var genJsdoc = function (configArg) {
var done = plugins.Q.defer(); var done = plugins.Q.defer();
plugins.beautylog.log("now generating " + "JsDoc documentation".blue); npmts_promisechain_1.npmtsOra.text("now generating JsDoc documentation");
plugins.gulp.src([ plugins.gulp.src([
plugins.path.join(paths.cwd, "README.md"), plugins.path.join(paths.cwd, "README.md"),
plugins.path.join(paths.distDir, "**/*.js") plugins.path.join(paths.distDir, "**/*.js")

View File

@ -1,6 +1,7 @@
"use strict"; "use strict";
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />
var plugins = require("./npmts.plugins"); var plugins = require("./npmts.plugins");
var npmts_promisechain_1 = require("./npmts.promisechain");
exports.isCi = function () { exports.isCi = function () {
return plugins.smartci.check.isCi(); return plugins.smartci.check.isCi();
}; };
@ -15,7 +16,7 @@ exports.doPublish = function () {
exports.run = function (configArg) { exports.run = function (configArg) {
var done = plugins.Q.defer(); var done = plugins.Q.defer();
var config = configArg; var config = configArg;
plugins.beautylog.log("now determining build options..."); npmts_promisechain_1.npmtsOra.text("now determining build options...");
//handle default mode //handle default mode
if (config.mode == "default") { if (config.mode == "default") {
config.typings = [ config.typings = [

View File

@ -1,6 +1,8 @@
"use strict"; "use strict";
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />
var plugins = require("./npmts.plugins"); var plugins = require("./npmts.plugins");
exports.npmtsOra = new plugins.beautylog.Ora("setting up TaskChain", "cyan");
exports.npmtsOra.start();
var NpmtsAssets = require("./npmts.assets"); 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");
@ -41,6 +43,7 @@ exports.run = 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!");
} }
}); });

9
dist/npmts.tests.js vendored
View File

@ -2,6 +2,7 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />
var plugins = require("./npmts.plugins"); var plugins = require("./npmts.plugins");
var paths = require("./npmts.paths"); var paths = require("./npmts.paths");
var npmts_promisechain_1 = require("./npmts.promisechain");
exports.publishCoverage = function (configArg) { exports.publishCoverage = function (configArg) {
var done = plugins.Q.defer(); var done = plugins.Q.defer();
plugins.beautylog.log("now uploading coverage data to codecov.io"); plugins.beautylog.log("now uploading coverage data to codecov.io");
@ -63,11 +64,9 @@ var coverage = function (configArg) {
exports.run = function (configArg) { exports.run = function (configArg) {
var done = plugins.Q.defer(); var done = plugins.Q.defer();
var config = configArg; var config = configArg;
plugins.beautylog.log("now starting tests"); npmts_promisechain_1.npmtsOra.text("now starting tests");
console.log("--------------------------------------------------------------\n" + plugins.beautylog.log("-------------------------------------------------------\n" +
"***************************" + "*************************** TESTS: ***************************\n" +
" TESTS: ".blue +
"***************************\n" +
"--------------------------------------------------------------"); "--------------------------------------------------------------");
istanbul(config) istanbul(config)
.then(mocha) .then(mocha)

View File

@ -7,8 +7,9 @@
"npmts": "dist/cli.js" "npmts": "dist/cli.js"
}, },
"scripts": { "scripts": {
"test": "(cd compile && node compile.js) && (cd test/assets && node ../../dist/index.js)", "test": "(npm run compile && npm run check)",
"release": "(git add -A && git commit -m 'update' && git push origin master && npm version patch && npm publish)" "check":"(cd ./test/assets && node ../../dist/index.js)",
"compile":"(cd compile && node compile.js)"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@ -25,21 +26,21 @@
}, },
"homepage": "https://github.com/pushrocks/npmts#readme", "homepage": "https://github.com/pushrocks/npmts#readme",
"dependencies": { "dependencies": {
"beautylog": "4.1.2", "beautylog": "5.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",
"gulp-concat": "^2.6.0", "gulp-concat": "^2.6.0",
"gulp-function": "^1.3.1", "gulp-function": "^1.3.1",
"gulp-if": "^2.0.0", "gulp-if": "^2.0.1",
"gulp-istanbul": "^0.10.4", "gulp-istanbul": "^0.10.4",
"gulp-jsdoc3": "^0.2.1", "gulp-jsdoc3": "^0.2.1",
"gulp-mocha": "^2.2.0", "gulp-mocha": "^2.2.0",
"gulp-replace": "^0.5.4", "gulp-replace": "^0.5.4",
"gulp-sourcemaps": "^2.0.0-alpha", "gulp-sourcemaps": "^2.0.0-alpha",
"gulp-typescript": "2.13.0", "gulp-typescript": "2.13.4",
"gulp-typings": "1.3.6", "gulp-typings": "1.3.6",
"lodash": "^4.11.1", "lodash": "^4.12.0",
"merge2": "1.0.2", "merge2": "1.0.2",
"projectinfo": "1.0.1", "projectinfo": "1.0.1",
"q": "^1.4.1", "q": "^1.4.1",
@ -47,8 +48,8 @@
"smartci": "0.0.1", "smartci": "0.0.1",
"smartcli": "0.0.11", "smartcli": "0.0.11",
"smartcov": "0.0.6", "smartcov": "0.0.6",
"smartenv": "1.2.2", "smartenv": "1.2.5",
"smartfile": "3.0.5", "smartfile": "3.0.6",
"smartpath": "3.2.1", "smartpath": "3.2.1",
"smartstring": "^1.0.3", "smartstring": "^1.0.3",
"source-map-support": "^0.4.0" "source-map-support": "^0.4.0"

View File

@ -6,4 +6,4 @@ var testplugin = {
}; };
module.exports = testplugin; module.exports = testplugin;
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLDRDQUE0QztBQUM1QyxJQUFJLFVBQVUsR0FBRztJQUNiLFlBQVksRUFBRTtRQUNWLE9BQU8sQ0FBQyxHQUFHLENBQUMsd0JBQXdCLENBQUMsQ0FBQztJQUMxQyxDQUFDO0NBQ0osQ0FBQztBQUNGLE1BQU0sQ0FBQyxPQUFPLEdBQUcsVUFBVSxDQUFDIiwiZmlsZSI6ImluZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8vIDxyZWZlcmVuY2UgcGF0aD1cIi4vdHlwaW5ncy9tYWluLmQudHNcIiAvPlxubGV0IHRlc3RwbHVnaW4gPSB7XG4gICAgbG9nU29tZXRoaW5nOiBmdW5jdGlvbigpe1xuICAgICAgICBjb25zb2xlLmxvZyhcIm9ubHkgZnVuY3Rpb24gZXhlY3V0ZWRcIik7XG4gICAgfVxufTtcbm1vZHVsZS5leHBvcnRzID0gdGVzdHBsdWdpbjsiXX0= //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLDRDQUE0QztBQUM1QyxJQUFJLFVBQVUsR0FBRztJQUNiLFlBQVksRUFBRTtRQUNWLE9BQU8sQ0FBQyxHQUFHLENBQUMsd0JBQXdCLENBQUMsQ0FBQztJQUMxQyxDQUFDO0NBQ0osQ0FBQztBQUNGLE1BQU0sQ0FBQyxPQUFPLEdBQUcsVUFBVSxDQUFDIiwiZmlsZSI6ImluZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8vIDxyZWZlcmVuY2UgcGF0aD1cIi4vdHlwaW5ncy9tYWluLmQudHNcIiAvPlxyXG5sZXQgdGVzdHBsdWdpbiA9IHtcclxuICAgIGxvZ1NvbWV0aGluZzogZnVuY3Rpb24oKXtcclxuICAgICAgICBjb25zb2xlLmxvZyhcIm9ubHkgZnVuY3Rpb24gZXhlY3V0ZWRcIik7XHJcbiAgICB9XHJcbn07XHJcbm1vZHVsZS5leHBvcnRzID0gdGVzdHBsdWdpbjsiXX0=

View File

@ -8,4 +8,4 @@ describe("testplugins", function () {
}); });
}); });
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsZ0RBQWdEO0FBQ2hELElBQUksVUFBVSxHQUFHLE9BQU8sQ0FBQyxrQkFBa0IsQ0FBQyxDQUFDO0FBQzdDLFFBQVEsQ0FBQyxhQUFhLEVBQUM7SUFDbkIsUUFBUSxDQUFDLGVBQWUsRUFBQztRQUNyQixFQUFFLENBQUMsc0JBQXNCLEVBQUM7WUFDdEIsVUFBVSxDQUFDLFlBQVksRUFBRSxDQUFBO1FBQzdCLENBQUMsQ0FBQyxDQUFDO0lBQ1AsQ0FBQyxDQUFDLENBQUM7QUFDUCxDQUFDLENBQUMsQ0FBQyIsImZpbGUiOiJ0ZXN0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8vIDxyZWZlcmVuY2UgcGF0aD1cIi4uL3RzL3R5cGluZ3MvbWFpbi5kLnRzXCIgLz5cbnZhciB0ZXN0cGx1Z2luID0gcmVxdWlyZShcIi4uL2Rpc3QvaW5kZXguanNcIik7XG5kZXNjcmliZShcInRlc3RwbHVnaW5zXCIsZnVuY3Rpb24oKXtcbiAgICBkZXNjcmliZShcIi5sb2dTb21ldGhpbmdcIixmdW5jdGlvbigpe1xuICAgICAgICBpdChcInNob3VsZCBsb2cgc29tZXRoaW5nXCIsZnVuY3Rpb24oKXtcbiAgICAgICAgICAgIHRlc3RwbHVnaW4ubG9nU29tZXRoaW5nKClcbiAgICAgICAgfSk7XG4gICAgfSk7XG59KTsiXX0= //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsZ0RBQWdEO0FBQ2hELElBQUksVUFBVSxHQUFHLE9BQU8sQ0FBQyxrQkFBa0IsQ0FBQyxDQUFDO0FBQzdDLFFBQVEsQ0FBQyxhQUFhLEVBQUM7SUFDbkIsUUFBUSxDQUFDLGVBQWUsRUFBQztRQUNyQixFQUFFLENBQUMsc0JBQXNCLEVBQUM7WUFDdEIsVUFBVSxDQUFDLFlBQVksRUFBRSxDQUFBO1FBQzdCLENBQUMsQ0FBQyxDQUFDO0lBQ1AsQ0FBQyxDQUFDLENBQUM7QUFDUCxDQUFDLENBQUMsQ0FBQyIsImZpbGUiOiJ0ZXN0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8vIDxyZWZlcmVuY2UgcGF0aD1cIi4uL3RzL3R5cGluZ3MvbWFpbi5kLnRzXCIgLz5cclxudmFyIHRlc3RwbHVnaW4gPSByZXF1aXJlKFwiLi4vZGlzdC9pbmRleC5qc1wiKTtcclxuZGVzY3JpYmUoXCJ0ZXN0cGx1Z2luc1wiLGZ1bmN0aW9uKCl7XHJcbiAgICBkZXNjcmliZShcIi5sb2dTb21ldGhpbmdcIixmdW5jdGlvbigpe1xyXG4gICAgICAgIGl0KFwic2hvdWxkIGxvZyBzb21ldGhpbmdcIixmdW5jdGlvbigpe1xyXG4gICAgICAgICAgICB0ZXN0cGx1Z2luLmxvZ1NvbWV0aGluZygpXHJcbiAgICAgICAgfSk7XHJcbiAgICB9KTtcclxufSk7Il19

View File

@ -1,14 +1,15 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />
import plugins = require("./npmts.plugins"); import plugins = require("./npmts.plugins");
import paths = require("./npmts.paths"); import paths = require("./npmts.paths");
import {npmtsOra} from "./npmts.promisechain";
export var run = function(configArg){ export var run = function(configArg){
let done = plugins.Q.defer(); let done = plugins.Q.defer();
let config = configArg; let config = configArg;
plugins.beautylog.log("now looking at required assets"); npmtsOra.text("now looking at required assets");
if(config.cli == true){ if(config.cli == true){
plugins.smartfile.fsaction.copy(plugins.path.join(paths.npmtsAssetsDir,"cli.js"),paths.distDir); plugins.smartfile.fsaction.copy(plugins.path.join(paths.npmtsAssetsDir,"cli.js"),paths.distDir);
plugins.beautylog.ok("CLI asset has been installed!"); plugins.beautylog.ok("installed CLI assets!");
done.resolve(config); done.resolve(config);
} else { } else {
done.resolve(config); done.resolve(config);

View File

@ -1,13 +1,14 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />
import plugins = require("./npmts.plugins"); import plugins = require("./npmts.plugins");
import paths = require("./npmts.paths"); import paths = require("./npmts.paths");
import {npmtsOra} from "./npmts.promisechain";
export let run = function(configArg){ export let run = function(configArg){
plugins.beautylog.log("now cleaning up from previous builds..."); npmtsOra.text("cleaning up from previous builds...");
let done = plugins.Q.defer(); let done = plugins.Q.defer();
plugins.smartfile.fsaction.remove(paths.distDir) plugins.smartfile.fsaction.remove(paths.distDir)
.then(function(){ .then(function(){
plugins.beautylog.ok("Cleaned up!"); plugins.beautylog.ok("Cleaned up from previous builds!");
done.resolve(configArg); done.resolve(configArg);
}); });
return done.promise; return done.promise;

View File

@ -1,14 +1,14 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />
import plugins = require("./npmts.plugins"); import plugins = require("./npmts.plugins");
import paths = require("./npmts.paths"); import paths = require("./npmts.paths");
import helpers = require("./npmts.compile.helpers"); import helpers = require("./npmts.compile.helpers");
import {npmtsOra} from "./npmts.promisechain";
/** /**
* handles definition to make them fit for modular use * handles definition to make them fit for modular use
*/ */
let definitionHandler = function(configArg){ let definitionHandler = function(configArg){
plugins.beautylog.log("now making declaration files ready"); npmtsOra.text("now making declaration files ready");
let done = plugins.Q.defer(); let done = plugins.Q.defer();
let configTsLenght = Object.keys(configArg.ts).length; let configTsLenght = Object.keys(configArg.ts).length;
if(configTsLenght == 0) { if(configTsLenght == 0) {
@ -24,7 +24,7 @@ let definitionHandler = function(configArg){
.pipe(plugins.g.gFunction(function(){ .pipe(plugins.g.gFunction(function(){
localCounter++ localCounter++
if(localCounter == configTsLenght){ if(localCounter == configTsLenght){
plugins.beautylog.ok("declaration files ready!!!"); plugins.beautylog.ok("made declaration files ready!");
done.resolve(configArg) done.resolve(configArg)
}; };
},"atEnd")); },"atEnd"));
@ -37,7 +37,7 @@ let definitionHandler = function(configArg){
export let run = function (configArg) { export let run = function (configArg) {
let done = plugins.Q.defer(); let done = plugins.Q.defer();
let config = configArg; let config = configArg;
plugins.beautylog.log("now compiling " + "TypeScript".yellow); npmtsOra.text("now compiling " + "TypeScript".yellow);
let moduleStream = plugins.merge2({ end: false }); let moduleStream = plugins.merge2({ end: false });
/* ------------------------------------------------- /* -------------------------------------------------
@ -74,7 +74,7 @@ export let run = function (configArg) {
moduleStream.on("queueDrain", function () { moduleStream.on("queueDrain", function () {
moduleStream.on("finish", function () { moduleStream.on("finish", function () {
plugins.beautylog.ok("TypeScript has been compiled!"); plugins.beautylog.ok("compiled TypeScript!");
definitionHandler(config) definitionHandler(config)
.then(function(){ .then(function(){
done.resolve(config); done.resolve(config);

View File

@ -1,18 +1,20 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />
import plugins = require("./npmts.plugins"); import plugins = require("./npmts.plugins");
import paths = require("./npmts.paths"); import paths = require("./npmts.paths");
import {npmtsOra} from "./npmts.promisechain";
export var run = function(configArg){ export var run = function(configArg){
var config = configArg; var config = configArg;
var done = plugins.Q.defer(); var done = plugins.Q.defer();
/* ------------------------------------------------- /* -------------------------------------------------
* ----------- install typings --------------- * ----------- install typings ---------------
* ----------------------------------------------- */ * ----------------------------------------------- */
plugins.beautylog.log("now installing " + "typings".yellow); npmtsOra.text("now installing typings");
var absoluteTypingsArray = plugins.smartpath.transform.toAbsolute(config.typings,paths.cwd); var absoluteTypingsArray = plugins.smartpath.transform.toAbsolute(config.typings,paths.cwd);
plugins.gulp.src(absoluteTypingsArray) plugins.gulp.src(absoluteTypingsArray)
.pipe(plugins.g.typings()) .pipe(plugins.g.typings())
.pipe(plugins.g.gFunction(function(){ .pipe(plugins.g.gFunction(function(){
plugins.beautylog.ok("typings have been installed!"); plugins.beautylog.ok("typings installed!");
done.resolve(config); done.resolve(config);
},"atEnd")); },"atEnd"));
return done.promise; return done.promise;

View File

@ -1,10 +1,11 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />
import plugins = require("./npmts.plugins"); import plugins = require("./npmts.plugins");
import paths = require("./npmts.paths"); import paths = require("./npmts.paths");
import {npmtsOra} from "./npmts.promisechain";
let genJsdoc = function(configArg){ let genJsdoc = function(configArg){
let done = plugins.Q.defer(); let done = plugins.Q.defer();
plugins.beautylog.log("now generating " + "JsDoc documentation".blue); npmtsOra.text("now generating JsDoc documentation");
plugins.gulp.src([ plugins.gulp.src([
plugins.path.join(paths.cwd,"README.md"), plugins.path.join(paths.cwd,"README.md"),
plugins.path.join(paths.distDir,"**/*.js") plugins.path.join(paths.distDir,"**/*.js")

View File

@ -1,5 +1,6 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />
import plugins = require("./npmts.plugins"); import plugins = require("./npmts.plugins");
import {npmtsOra} from "./npmts.promisechain";
export let isCi = function(){ export let isCi = function(){
return plugins.smartci.check.isCi(); return plugins.smartci.check.isCi();
@ -19,7 +20,7 @@ export var run = function(configArg){
var done = plugins.Q.defer(); var done = plugins.Q.defer();
var config = configArg; var config = configArg;
plugins.beautylog.log("now determining build options..."); npmtsOra.text("now determining build options...");
//handle default mode //handle default mode
if (config.mode == "default"){ if (config.mode == "default"){

View File

@ -1,5 +1,5 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />
export let beautylog = require("beautylog"); export import beautylog = require("beautylog");
export let fs = require("fs-extra"); export let fs = require("fs-extra");
export let gulp = require("gulp"); export let gulp = require("gulp");
export let g = { export let g = {

View File

@ -1,6 +1,9 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />
import plugins = require("./npmts.plugins"); import plugins = require("./npmts.plugins");
export let npmtsOra = new plugins.beautylog.Ora("setting up TaskChain","cyan");
npmtsOra.start();
import NpmtsAssets = require("./npmts.assets"); 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");
@ -41,6 +44,7 @@ export var run = 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!")
} }

View File

@ -1,6 +1,7 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/main.d.ts" />
import plugins = require("./npmts.plugins"); import plugins = require("./npmts.plugins");
import paths = require("./npmts.paths"); import paths = require("./npmts.paths");
import {npmtsOra} from "./npmts.promisechain";
export let publishCoverage = function(configArg){ export let publishCoverage = function(configArg){
let done = plugins.Q.defer(); let done = plugins.Q.defer();
@ -71,12 +72,10 @@ export let run = function(configArg) {
let done = plugins.Q.defer(); let done = plugins.Q.defer();
let config = configArg; let config = configArg;
plugins.beautylog.log("now starting tests"); npmtsOra.text("now starting tests");
console.log( plugins.beautylog.log(
"--------------------------------------------------------------\n" + "-------------------------------------------------------\n" +
"***************************" + "*************************** TESTS: ***************************\n" +
" TESTS: ".blue +
"***************************\n" +
"--------------------------------------------------------------" "--------------------------------------------------------------"
); );