improve log output and clear default typings directory, before getting new typings.

This commit is contained in:
Philipp Kunz 2016-05-20 00:55:14 +02:00
parent 759d4031d2
commit e8053fa9e1
11 changed files with 34 additions and 32 deletions

View File

@ -6,7 +6,7 @@ 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");
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!");

4
dist/npmts.clean.js vendored
View File

@ -4,10 +4,12 @@ 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 () {
return plugins.smartfile.fsaction.remove(paths.distDir);
npmts_promisechain_1.npmtsOra.text("cleaning " + "typings".yellow + " folder");
return plugins.smartfile.fsaction.remove(paths.typingsDir);
};
exports.run = function (configArg) {
npmts_promisechain_1.npmtsOra.text("cleaning up from previous builds...");

View File

@ -9,7 +9,7 @@ exports.run = function (configArg) {
/* -------------------------------------------------
* ----------- install typings ---------------
* ----------------------------------------------- */
npmts_promisechain_1.npmtsOra.text("now installing typings");
npmts_promisechain_1.npmtsOra.text("now installing " + "typings".yellow);
var absoluteTypingsArray = plugins.smartpath.transform.toAbsolute(config.typings, paths.cwd);
plugins.gulp.src(absoluteTypingsArray)
.pipe(plugins.g.typings())

2
dist/npmts.jsdoc.js vendored
View File

@ -5,7 +5,7 @@ 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");
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")

21
dist/npmts.paths.js vendored
View File

@ -1,16 +1,15 @@
"use strict";
/// <reference path="./typings/index.d.ts" />
var plugins = require("./npmts.plugins");
var paths = {};
paths.cwd = plugins.smartcli.get.cwd().path;
exports.cwd = plugins.smartcli.get.cwd().path;
//Directories
paths.tsDir = plugins.path.join(paths.cwd, "ts/");
paths.distDir = plugins.path.join(paths.cwd, "dist/");
paths.docsDir = plugins.path.join(paths.cwd, "docs/");
paths.testDir = plugins.path.join(paths.cwd, "test/");
paths.coverageDir = plugins.path.join(paths.cwd, "coverage/");
paths.npmtsAssetsDir = plugins.path.join(__dirname, "../assets/");
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
paths.indexTS = plugins.path.join(paths.cwd, "ts/index.ts");
paths.testTS = plugins.path.join(paths.cwd, "ts/test.ts");
module.exports = paths;
exports.indexTS = plugins.path.join(exports.cwd, "ts/index.ts");
exports.testTS = plugins.path.join(exports.cwd, "ts/test.ts");

View File

@ -49,7 +49,7 @@
"smartcli": "0.0.11",
"smartcov": "0.0.6",
"smartenv": "1.2.5",
"smartfile": "3.0.6",
"smartfile": "3.0.7",
"smartpath": "3.2.1",
"smartstring": "^1.0.3",
"source-map-support": "^0.4.0"

View File

@ -6,7 +6,7 @@ import {npmtsOra} from "./npmts.promisechain";
export var run = function(configArg){
let done = plugins.Q.defer();
let config = configArg;
npmtsOra.text("now looking at required assets");
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!");

View File

@ -4,11 +4,13 @@ import paths = require("./npmts.paths");
import {npmtsOra} from "./npmts.promisechain";
let removeDist = function(){
npmtsOra.text("cleaning " + "dist".yellow + " folder");
return plugins.smartfile.fsaction.remove(paths.distDir);
};
let removeTypings = function(){
return plugins.smartfile.fsaction.remove(paths.distDir);
npmtsOra.text("cleaning " + "typings".yellow + " folder");
return plugins.smartfile.fsaction.remove(paths.typingsDir);
};
export let run = function(configArg){

View File

@ -9,7 +9,7 @@ export var run = function(configArg){
/* -------------------------------------------------
* ----------- install typings ---------------
* ----------------------------------------------- */
npmtsOra.text("now installing typings");
npmtsOra.text("now installing " + "typings".yellow);
var absoluteTypingsArray = plugins.smartpath.transform.toAbsolute(config.typings,paths.cwd);
plugins.gulp.src(absoluteTypingsArray)
.pipe(plugins.g.typings())

View File

@ -5,7 +5,7 @@ import {npmtsOra} from "./npmts.promisechain";
let genJsdoc = function(configArg){
let done = plugins.Q.defer();
npmtsOra.text("now generating JsDoc documentation");
npmtsOra.text("now generating " + "JsDoc documentation".yellow);
plugins.gulp.src([
plugins.path.join(paths.cwd,"README.md"),
plugins.path.join(paths.distDir,"**/*.js")

View File

@ -1,19 +1,18 @@
/// <reference path="./typings/index.d.ts" />
import plugins = require("./npmts.plugins");
var paths:any = {};
paths.cwd = plugins.smartcli.get.cwd().path;
export let cwd = plugins.smartcli.get.cwd().path;
//Directories
paths.tsDir = plugins.path.join(paths.cwd,"ts/");
paths.distDir = plugins.path.join(paths.cwd,"dist/");
paths.docsDir = plugins.path.join(paths.cwd,"docs/");
paths.testDir = plugins.path.join(paths.cwd,"test/");
paths.coverageDir = plugins.path.join(paths.cwd,"coverage/");
export let tsDir = plugins.path.join(cwd,"ts/");
export let distDir = plugins.path.join(cwd,"dist/");
export let docsDir = plugins.path.join(cwd,"docs/");
export let testDir = plugins.path.join(cwd,"test/");
export let typingsDir = plugins.path.join(cwd,"ts/typings/");
export let coverageDir = plugins.path.join(cwd,"coverage/");
paths.npmtsAssetsDir = plugins.path.join(__dirname,"../assets/");
export let npmtsAssetsDir = plugins.path.join(__dirname,"../assets/");
//Files
paths.indexTS = plugins.path.join(paths.cwd,"ts/index.ts");
paths.testTS = plugins.path.join(paths.cwd,"ts/test.ts");
export = paths;
export let indexTS = plugins.path.join(cwd,"ts/index.ts");
export let testTS = plugins.path.join(cwd,"ts/test.ts");