now has <clean> command

This commit is contained in:
2016-06-26 04:54:10 +02:00
parent 21b46dd939
commit 83cd4e9a13
5 changed files with 51 additions and 1 deletions

View File

@ -6,6 +6,7 @@ let npmciInfo = new plugins.projectinfo.ProjectinfoNpm(paths.NpmciPackageRoot);
plugins.beautylog.log("npmci version: " + npmciInfo.version);
import {build} from "./npmci.build"
import {clean} from "./npmci.clean";
import {command} from "./npmci.command";
import {install} from "./npmci.install";
import {publish} from "./npmci.publish";
@ -30,6 +31,14 @@ smartcli.addCommand({
.then(NpmciEnv.configStore);
});
// clean
smartcli.addCommand({
commandName:"clean"
}).then((argv) => {
clean()
.then(NpmciEnv.configStore);
});
// command
smartcli.addCommand({
commandName:"command"

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

@ -0,0 +1,13 @@
import "typings-global";
import * as plugins from "./npmci.plugins";
import * as paths from "./npmci.paths"
/**
* cleans npmci config files
*/
export let clean = () => {
let done = plugins.q.defer();
plugins.smartfile.fs.removeSync(paths.NpmciPackageConfig);
done.resolve();
return done.promise;
};