now has <clean> command
This commit is contained in:
parent
21b46dd939
commit
83cd4e9a13
10
dist/index.js
vendored
10
dist/index.js
vendored
File diff suppressed because one or more lines are too long
5
dist/npmci.clean.d.ts
vendored
Normal file
5
dist/npmci.clean.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
import "typings-global";
|
||||
/**
|
||||
* cleans npmci config files
|
||||
*/
|
||||
export declare let clean: () => any;
|
15
dist/npmci.clean.js
vendored
Normal file
15
dist/npmci.clean.js
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
require("typings-global");
|
||||
var plugins = require("./npmci.plugins");
|
||||
var paths = require("./npmci.paths");
|
||||
/**
|
||||
* cleans npmci config files
|
||||
*/
|
||||
exports.clean = function () {
|
||||
var done = plugins.q.defer();
|
||||
plugins.smartfile.fs.removeSync(paths.NpmciPackageConfig);
|
||||
done.resolve();
|
||||
return done.promise;
|
||||
};
|
||||
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWNpLmNsZWFuLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxRQUFPLGdCQUFnQixDQUFDLENBQUE7QUFDeEIsSUFBWSxPQUFPLFdBQU0saUJBQWlCLENBQUMsQ0FBQTtBQUMzQyxJQUFZLEtBQUssV0FBTSxlQUt2QixDQUFDLENBTHFDO0FBRXRDOztHQUVHO0FBQ1EsYUFBSyxHQUFHO0lBQ2YsSUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLENBQUMsQ0FBQyxLQUFLLEVBQUUsQ0FBQztJQUM3QixPQUFPLENBQUMsU0FBUyxDQUFDLEVBQUUsQ0FBQyxVQUFVLENBQUMsS0FBSyxDQUFDLGtCQUFrQixDQUFDLENBQUM7SUFDMUQsSUFBSSxDQUFDLE9BQU8sRUFBRSxDQUFDO0lBQ2YsTUFBTSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUM7QUFDeEIsQ0FBQyxDQUFDIiwiZmlsZSI6Im5wbWNpLmNsZWFuLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFwidHlwaW5ncy1nbG9iYWxcIjtcbmltcG9ydCAqIGFzIHBsdWdpbnMgZnJvbSBcIi4vbnBtY2kucGx1Z2luc1wiO1xuaW1wb3J0ICogYXMgcGF0aHMgZnJvbSBcIi4vbnBtY2kucGF0aHNcIlxuXG4vKipcbiAqIGNsZWFucyBucG1jaSBjb25maWcgZmlsZXNcbiAqL1xuZXhwb3J0IGxldCBjbGVhbiA9ICgpID0+IHtcbiAgICBsZXQgZG9uZSA9IHBsdWdpbnMucS5kZWZlcigpO1xuICAgIHBsdWdpbnMuc21hcnRmaWxlLmZzLnJlbW92ZVN5bmMocGF0aHMuTnBtY2lQYWNrYWdlQ29uZmlnKTtcbiAgICBkb25lLnJlc29sdmUoKTtcbiAgICByZXR1cm4gZG9uZS5wcm9taXNlO1xufTsiXX0=
|
@ -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;
|
||||
};
|
Loading…
Reference in New Issue
Block a user