fix project cleaning
This commit is contained in:
parent
8c633b3c30
commit
4a17953298
16
dist/npmts.clean.js
vendored
16
dist/npmts.clean.js
vendored
@ -4,24 +4,18 @@ 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");
|
||||
npmts_promisechain_1.npmtsOra.text("cleaning dist folder");
|
||||
return plugins.smartfile.fs.remove(paths.distDir);
|
||||
};
|
||||
var removeTypings = function () {
|
||||
var done = plugins.Q.defer();
|
||||
npmts_promisechain_1.npmtsOra.text("cleaning " + "typings".yellow + " folder");
|
||||
if (false) {
|
||||
}
|
||||
else {
|
||||
done.resolve();
|
||||
}
|
||||
return done.promise;
|
||||
var removePages = function () {
|
||||
npmts_promisechain_1.npmtsOra.text("cleaning pages folder");
|
||||
return plugins.smartfile.fs.remove(paths.pagesDir);
|
||||
};
|
||||
exports.run = function (configArg) {
|
||||
npmts_promisechain_1.npmtsOra.text("cleaning up from previous builds...");
|
||||
var done = plugins.Q.defer();
|
||||
removeDist()
|
||||
.then(removeTypings)
|
||||
.then(removePages)
|
||||
.then(function () {
|
||||
plugins.beautylog.ok("Cleaned up from previous builds!");
|
||||
done.resolve(configArg);
|
||||
|
@ -4,27 +4,20 @@ import paths = require("./npmts.paths");
|
||||
import {npmtsOra} from "./npmts.promisechain";
|
||||
|
||||
let removeDist = function(){
|
||||
npmtsOra.text("cleaning " + "dist".yellow + " folder");
|
||||
npmtsOra.text("cleaning dist folder");
|
||||
return plugins.smartfile.fs.remove(paths.distDir);
|
||||
};
|
||||
|
||||
let removeTypings = function(){
|
||||
let done = plugins.Q.defer();
|
||||
npmtsOra.text("cleaning " + "typings".yellow + " folder");
|
||||
if(false){
|
||||
//plugins.smartfile.fsaction.remove(paths.typingsDir)
|
||||
// .then(done.resolve);
|
||||
} else {
|
||||
done.resolve();
|
||||
}
|
||||
return done.promise;
|
||||
let removePages = function(){
|
||||
npmtsOra.text("cleaning pages folder");
|
||||
return plugins.smartfile.fs.remove(paths.pagesDir);
|
||||
};
|
||||
|
||||
export let run = function(configArg){
|
||||
npmtsOra.text("cleaning up from previous builds...");
|
||||
let done = plugins.Q.defer();
|
||||
removeDist()
|
||||
.then(removeTypings)
|
||||
.then(removePages)
|
||||
.then(function(){
|
||||
plugins.beautylog.ok("Cleaned up from previous builds!");
|
||||
done.resolve(configArg);
|
||||
|
Loading…
Reference in New Issue
Block a user