fix project cleaning
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user