now cleaning up

This commit is contained in:
Philipp Kunz 2016-03-21 01:07:34 +01:00
parent b76cb1376d
commit e7e228c900
8 changed files with 34 additions and 6 deletions

13
dist/npmts.clean.js vendored Normal file
View File

@ -0,0 +1,13 @@
"use strict";
/// <reference path="./typings/main.d.ts" />
var plugins = require("./npmts.plugins");
var paths = require("./npmts.paths");
exports.run = function (configArg) {
plugins.beautylog.log("now cleaning up from previous builds");
var done = plugins.Q.defer();
plugins.smartfile.fsaction.remove(paths.distDir)
.then(function () {
done.resolve(configArg);
});
return done.promise;
};

View File

@ -2,6 +2,7 @@
/// <reference path="./typings/main.d.ts" />
var plugins = require("./npmts.plugins");
var NpmtsAssets = require("./npmts.assets");
var NpmtsClean = require("./npmts.clean");
var NpmtsCompile = require("./npmts.compile");
var NpmtsConfigFile = require("./npmts.configfile");
var NpmtsInstall = require("./npmts.install");
@ -12,6 +13,7 @@ exports.run = function () {
var promisechain;
NpmtsConfigFile.run()
.then(NpmtsOptions.run)
.then(NpmtsClean.run)
.then(NpmtsInstall.run)
.then(NpmtsCompile.run)
.then(NpmtsAssets.run)

View File

@ -44,8 +44,8 @@
"shelljs": "^0.6.0",
"smartcli": "0.0.11",
"smartenv": "1.2.0",
"smartfile": "2.1.1",
"smartpath": "3.0.0",
"smartfile": "2.2.0",
"smartpath": "3.0.1",
"source-map-support": "^0.4.0"
},
"devDependencies": {}

View File

@ -1,2 +0,0 @@
#!/usr/bin/env node
var index = require("./index.js");

View File

@ -1,5 +1,5 @@
{
"mode":"custom",
"mode":"default",
"ts":{
"./customdir/*.ts":"./"
},

13
ts/npmts.clean.ts Normal file
View File

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

View File

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

View File

@ -2,6 +2,7 @@
import plugins = require("./npmts.plugins");
import NpmtsAssets = require("./npmts.assets");
import NpmtsClean = require("./npmts.clean");
import NpmtsCompile = require("./npmts.compile");
import NpmtsConfigFile = require("./npmts.configfile");
import NpmtsInstall = require("./npmts.install");
@ -13,6 +14,7 @@ export var run = function(){
var promisechain;
NpmtsConfigFile.run()
.then(NpmtsOptions.run)
.then(NpmtsClean.run)
.then(NpmtsInstall.run)
.then(NpmtsCompile.run)
.then(NpmtsAssets.run)