now has <clean> command
This commit is contained in:
@ -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
13
ts/npmci.clean.ts
Normal 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;
|
||||
};
|
Reference in New Issue
Block a user