prepare for better smartfile module.

This commit is contained in:
Philipp Kunz 2016-05-19 22:11:18 +02:00
parent 28e71356ff
commit 759d4031d2
36 changed files with 55 additions and 48 deletions

2
dist/index.js vendored
View File

@ -1,5 +1,5 @@
"use strict"; "use strict";
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.d.ts" />
console.log("**** starting NPMTS ****"); console.log("**** starting 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");

View File

@ -1,5 +1,5 @@
"use strict"; "use strict";
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.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 npmts_promisechain_1 = require("./npmts.promisechain");

11
dist/npmts.clean.js vendored
View File

@ -1,12 +1,19 @@
"use strict"; "use strict";
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.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 npmts_promisechain_1 = require("./npmts.promisechain");
var removeDist = function () {
return plugins.smartfile.fsaction.remove(paths.distDir);
};
var removeTypings = function () {
return plugins.smartfile.fsaction.remove(paths.distDir);
};
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...");
var done = plugins.Q.defer(); var done = plugins.Q.defer();
plugins.smartfile.fsaction.remove(paths.distDir) removeDist()
.then(removeTypings)
.then(function () { .then(function () {
plugins.beautylog.ok("Cleaned up from previous builds!"); plugins.beautylog.ok("Cleaned up from previous builds!");
done.resolve(configArg); done.resolve(configArg);

2
dist/npmts.cli.js vendored
View File

@ -1 +1 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.d.ts" />

View File

@ -1,5 +1,5 @@
"use strict"; "use strict";
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.d.ts" />
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");

View File

@ -1,5 +1,5 @@
"use strict"; "use strict";
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.d.ts" />
var plugins = require("./npmts.plugins"); var plugins = require("./npmts.plugins");
var paths = require("./npmts.paths"); var paths = require("./npmts.paths");
exports.run = function () { exports.run = function () {

View File

@ -1,5 +1,5 @@
"use strict"; "use strict";
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.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 npmts_promisechain_1 = require("./npmts.promisechain");

2
dist/npmts.jsdoc.js vendored
View File

@ -1,5 +1,5 @@
"use strict"; "use strict";
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.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 npmts_promisechain_1 = require("./npmts.promisechain");

View File

@ -1,5 +1,5 @@
"use strict"; "use strict";
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.d.ts" />
var plugins = require("./npmts.plugins"); var plugins = require("./npmts.plugins");
var npmts_promisechain_1 = require("./npmts.promisechain"); var npmts_promisechain_1 = require("./npmts.promisechain");
exports.isCi = function () { exports.isCi = function () {

2
dist/npmts.paths.js vendored
View File

@ -1,5 +1,5 @@
"use strict"; "use strict";
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.d.ts" />
var plugins = require("./npmts.plugins"); var plugins = require("./npmts.plugins");
var paths = {}; var paths = {};
paths.cwd = plugins.smartcli.get.cwd().path; paths.cwd = plugins.smartcli.get.cwd().path;

View File

@ -1,5 +1,5 @@
"use strict"; "use strict";
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.d.ts" />
exports.beautylog = require("beautylog"); exports.beautylog = require("beautylog");
exports.fs = require("fs-extra"); exports.fs = require("fs-extra");
exports.gulp = require("gulp"); exports.gulp = require("gulp");

View File

@ -1,5 +1,5 @@
"use strict"; "use strict";
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.d.ts" />
var plugins = require("./npmts.plugins"); var plugins = require("./npmts.plugins");
exports.npmtsOra = new plugins.beautylog.Ora("setting up TaskChain", "cyan"); exports.npmtsOra = new plugins.beautylog.Ora("setting up TaskChain", "cyan");
exports.npmtsOra.start(); exports.npmtsOra.start();

View File

@ -1,5 +1,5 @@
"use strict"; "use strict";
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.d.ts" />
var plugins = require("./npmts.plugins"); var plugins = require("./npmts.plugins");
var NpmtsTests = require("./npmts.tests"); var NpmtsTests = require("./npmts.tests");
var NpmtsJsdoc = require("./npmts.jsdoc"); var NpmtsJsdoc = require("./npmts.jsdoc");

2
dist/npmts.tests.js vendored
View File

@ -1,5 +1,5 @@
"use strict"; "use strict";
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.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 npmts_promisechain_1 = require("./npmts.promisechain");

View File

@ -1,4 +1,4 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.d.ts" />
var testplugin = { var testplugin = {
logSomething: function () { logSomething: function () {
console.log("only function executed"); console.log("only function executed");
@ -6,4 +6,4 @@ var testplugin = {
}; };
module.exports = testplugin; module.exports = testplugin;
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLDRDQUE0QztBQUM1QyxJQUFJLFVBQVUsR0FBRztJQUNiLFlBQVksRUFBRTtRQUNWLE9BQU8sQ0FBQyxHQUFHLENBQUMsd0JBQXdCLENBQUMsQ0FBQztJQUMxQyxDQUFDO0NBQ0osQ0FBQztBQUNGLE1BQU0sQ0FBQyxPQUFPLEdBQUcsVUFBVSxDQUFDIiwiZmlsZSI6ImluZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8vIDxyZWZlcmVuY2UgcGF0aD1cIi4vdHlwaW5ncy9tYWluLmQudHNcIiAvPlxyXG5sZXQgdGVzdHBsdWdpbiA9IHtcclxuICAgIGxvZ1NvbWV0aGluZzogZnVuY3Rpb24oKXtcclxuICAgICAgICBjb25zb2xlLmxvZyhcIm9ubHkgZnVuY3Rpb24gZXhlY3V0ZWRcIik7XHJcbiAgICB9XHJcbn07XHJcbm1vZHVsZS5leHBvcnRzID0gdGVzdHBsdWdpbjsiXX0= //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLDZDQUE2QztBQUM3QyxJQUFJLFVBQVUsR0FBRztJQUNiLFlBQVksRUFBRTtRQUNWLE9BQU8sQ0FBQyxHQUFHLENBQUMsd0JBQXdCLENBQUMsQ0FBQztJQUMxQyxDQUFDO0NBQ0osQ0FBQztBQUNGLE1BQU0sQ0FBQyxPQUFPLEdBQUcsVUFBVSxDQUFDIiwiZmlsZSI6ImluZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8vIDxyZWZlcmVuY2UgcGF0aD1cIi4vdHlwaW5ncy9pbmRleC5kLnRzXCIgLz5cclxubGV0IHRlc3RwbHVnaW4gPSB7XHJcbiAgICBsb2dTb21ldGhpbmc6IGZ1bmN0aW9uKCl7XHJcbiAgICAgICAgY29uc29sZS5sb2coXCJvbmx5IGZ1bmN0aW9uIGV4ZWN1dGVkXCIpO1xyXG4gICAgfVxyXG59O1xyXG5tb2R1bGUuZXhwb3J0cyA9IHRlc3RwbHVnaW47Il19

View File

@ -1,4 +1,4 @@
/// <reference path="../ts/typings/main.d.ts" /> /// <reference path="../ts/typings/index.d.ts" />
var testplugin = require("../dist/index.js"); var testplugin = require("../dist/index.js");
describe("testplugins", function () { describe("testplugins", function () {
describe(".logSomething", function () { describe(".logSomething", function () {
@ -8,4 +8,4 @@ describe("testplugins", function () {
}); });
}); });
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsZ0RBQWdEO0FBQ2hELElBQUksVUFBVSxHQUFHLE9BQU8sQ0FBQyxrQkFBa0IsQ0FBQyxDQUFDO0FBQzdDLFFBQVEsQ0FBQyxhQUFhLEVBQUM7SUFDbkIsUUFBUSxDQUFDLGVBQWUsRUFBQztRQUNyQixFQUFFLENBQUMsc0JBQXNCLEVBQUM7WUFDdEIsVUFBVSxDQUFDLFlBQVksRUFBRSxDQUFBO1FBQzdCLENBQUMsQ0FBQyxDQUFDO0lBQ1AsQ0FBQyxDQUFDLENBQUM7QUFDUCxDQUFDLENBQUMsQ0FBQyIsImZpbGUiOiJ0ZXN0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8vIDxyZWZlcmVuY2UgcGF0aD1cIi4uL3RzL3R5cGluZ3MvbWFpbi5kLnRzXCIgLz5cclxudmFyIHRlc3RwbHVnaW4gPSByZXF1aXJlKFwiLi4vZGlzdC9pbmRleC5qc1wiKTtcclxuZGVzY3JpYmUoXCJ0ZXN0cGx1Z2luc1wiLGZ1bmN0aW9uKCl7XHJcbiAgICBkZXNjcmli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Sk7XHJcbn0pOyJdfQ==

View File

@ -1,4 +1,4 @@
/// <reference path="../ts/typings/main.d.ts" /> /// <reference path="../ts/typings/index.d.ts" />
var testplugin = require("../dist/index.js"); var testplugin = require("../dist/index.js");
describe("testplugins",function(){ describe("testplugins",function(){
describe(".logSomething",function(){ describe(".logSomething",function(){

View File

@ -1,8 +0,0 @@
/// <reference path="./typings/main.d.ts" />
var testplugin = {
logSomething: function () {
console.log("only function executed");
}
};
module.exports = testplugin;
//# sourceMappingURL=index.js.map

View File

@ -1 +0,0 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,IAAI,UAAU,GAAG;IACb,YAAY,EAAE;QACV,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;IAC1C,CAAC;CACJ,CAAC;AACF,MAAM,CAAC,OAAO,GAAG,UAAU,CAAC"}

View File

@ -1,4 +1,4 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.d.ts" />
let testplugin = { let testplugin = {
logSomething: function(){ logSomething: function(){
console.log("only function executed"); console.log("only function executed");

View File

@ -1,5 +1,5 @@
{ {
"ambientDependencies": { "globalDependencies": {
"node": "github:DefinitelyTyped/DefinitelyTyped/node/node.d.ts", "node": "github:DefinitelyTyped/DefinitelyTyped/node/node.d.ts",
"mocha": "github:Bartvds/tsd-deftools/typings/DefinitelyTyped/mocha/mocha.d.ts", "mocha": "github:Bartvds/tsd-deftools/typings/DefinitelyTyped/mocha/mocha.d.ts",
"colors": "github:DefinitelyTyped/DefinitelyTyped/colors/colors.d.ts", "colors": "github:DefinitelyTyped/DefinitelyTyped/colors/colors.d.ts",

View File

@ -1,4 +1,4 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.d.ts" />
console.log("**** starting NPMTS ****"); console.log("**** starting NPMTS ****");
import * as plugins from "./npmts.plugins" import * as plugins from "./npmts.plugins"
import {promisechain} from "./npmts.promisechain"; import {promisechain} from "./npmts.promisechain";

View File

@ -1,4 +1,4 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.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"; import {npmtsOra} from "./npmts.promisechain";

View File

@ -1,12 +1,21 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.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"; import {npmtsOra} from "./npmts.promisechain";
let removeDist = function(){
return plugins.smartfile.fsaction.remove(paths.distDir);
};
let removeTypings = function(){
return plugins.smartfile.fsaction.remove(paths.distDir);
};
export let run = function(configArg){ export let run = function(configArg){
npmtsOra.text("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) removeDist()
.then(removeTypings)
.then(function(){ .then(function(){
plugins.beautylog.ok("Cleaned up from previous builds!"); plugins.beautylog.ok("Cleaned up from previous builds!");
done.resolve(configArg); done.resolve(configArg);

View File

@ -1 +1 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.d.ts" />

View File

@ -1,4 +1,4 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.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");

View File

@ -1,4 +1,4 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.d.ts" />
import plugins = require("./npmts.plugins"); import plugins = require("./npmts.plugins");
import paths = require("./npmts.paths"); import paths = require("./npmts.paths");
export var run = function(){ export var run = function(){

View File

@ -1,4 +1,4 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.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"; import {npmtsOra} from "./npmts.promisechain";

View File

@ -1,4 +1,4 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.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"; import {npmtsOra} from "./npmts.promisechain";

View File

@ -1,4 +1,4 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.d.ts" />
import plugins = require("./npmts.plugins"); import plugins = require("./npmts.plugins");
import {npmtsOra} from "./npmts.promisechain"; import {npmtsOra} from "./npmts.promisechain";

View File

@ -1,4 +1,4 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.d.ts" />
import plugins = require("./npmts.plugins"); import plugins = require("./npmts.plugins");
var paths:any = {}; var paths:any = {};
paths.cwd = plugins.smartcli.get.cwd().path; paths.cwd = plugins.smartcli.get.cwd().path;

View File

@ -1,4 +1,4 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.d.ts" />
export import 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");

View File

@ -1,4 +1,4 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.d.ts" />
import plugins = require("./npmts.plugins"); import plugins = require("./npmts.plugins");
export let npmtsOra = new plugins.beautylog.Ora("setting up TaskChain","cyan"); export let npmtsOra = new plugins.beautylog.Ora("setting up TaskChain","cyan");
@ -45,7 +45,7 @@ export let promisechain = function(){
plugins.beautylog.success("READY TO SHIP!"); plugins.beautylog.success("READY TO SHIP!");
} else { } else {
npmtsOra.endOk("Tasks finished!"); npmtsOra.endOk("Tasks finished!");
plugins.beautylog.success("Done!") plugins.beautylog.success("Done!");
} }
done.resolve(); done.resolve();
}); });

View File

@ -1,4 +1,4 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.d.ts" />
import plugins = require("./npmts.plugins"); import plugins = require("./npmts.plugins");
import paths = require("./npmts.paths"); import paths = require("./npmts.paths");
import NpmtsTests = require("./npmts.tests"); import NpmtsTests = require("./npmts.tests");

View File

@ -1,4 +1,4 @@
/// <reference path="./typings/main.d.ts" /> /// <reference path="./typings/index.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"; import {npmtsOra} from "./npmts.promisechain";

View File

@ -1,5 +1,5 @@
{ {
"ambientDependencies": { "globalDependencies": {
"colors": "github:DefinitelyTyped/DefinitelyTyped/colors/colors.d.ts#09e37435ffb2c56a6f908081194a74756f24f99d", "colors": "github:DefinitelyTyped/DefinitelyTyped/colors/colors.d.ts#09e37435ffb2c56a6f908081194a74756f24f99d",
"istanbul": "registry:dt/istanbul#0.4.0+20160316155526", "istanbul": "registry:dt/istanbul#0.4.0+20160316155526",
"node": "github:DefinitelyTyped/DefinitelyTyped/node/node.d.ts#78d36dd49b6b55b9fdfe61776a12bf05c8b07777", "node": "github:DefinitelyTyped/DefinitelyTyped/node/node.d.ts#78d36dd49b6b55b9fdfe61776a12bf05c8b07777",