diff --git a/dist/index.js b/dist/index.js index b1747d8..17e8bcf 100644 --- a/dist/index.js +++ b/dist/index.js @@ -6,6 +6,7 @@ var paths = require("./npmci.paths"); var npmciInfo = new plugins.projectinfo.ProjectinfoNpm(paths.NpmciPackageRoot); plugins.beautylog.log("npmci version: " + npmciInfo.version); var npmci_build_1 = require("./npmci.build"); +var npmci_clean_1 = require("./npmci.clean"); var npmci_command_1 = require("./npmci.command"); var npmci_install_1 = require("./npmci.install"); var npmci_publish_1 = require("./npmci.publish"); @@ -28,6 +29,13 @@ smartcli.addCommand({ npmci_build_1.build(argv._[1]) .then(NpmciEnv.configStore); }); +// clean +smartcli.addCommand({ + commandName: "clean" +}).then(function (argv) { + npmci_clean_1.clean() + .then(NpmciEnv.configStore); +}); // command smartcli.addCommand({ commandName: "command" @@ -71,4 +79,4 @@ smartcli.addCommand({ }); smartcli.startParse(); -//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQ0EsUUFBTyxnQkFBZ0IsQ0FBQyxDQUFBO0FBQ3hCLElBQVksT0FBTyxXQUFNLGlCQUFpQixDQUFDLENBQUE7QUFDM0MsSUFBWSxLQUFLLFdBQU0sZUFBZSxDQUFDLENBQUE7QUFDdkMsSUFBSSxTQUFTLEdBQUcsSUFBSSxPQUFPLENBQUMsV0FBVyxDQUFDLGNBQWMsQ0FBQyxLQUFLLENBQUMsZ0JBQWdCLENBQUMsQ0FBQztBQUMvRSxPQUFPLENBQUMsU0FBUyxDQUFDLEdBQUcsQ0FBQyxpQkFBaUIsR0FBRyxTQUFTLENBQUMsT0FBTyxDQUFDLENBQUM7QUFFN0QsNEJBQW9CLGVBQ3BCLENBQUMsQ0FEa0M7QUFDbkMsOEJBQXNCLGlCQUFpQixDQUFDLENBQUE7QUFDeEMsOEJBQXNCLGlCQUFpQixDQUFDLENBQUE7QUFDeEMs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3YpID0+IHtcbiAgICB0ZXN0KGFyZ3YuX1sxXSlcbiAgICAgICAgLnRoZW4oTnBtY2lFbnYuY29uZmlnU3RvcmUpO1xufSk7XG5cbi8vIHRyaWdnZXJcbnNtYXJ0Y2xpLmFkZENvbW1hbmQoe1xuICAgIGNvbW1hbmROYW1lOlwidHJpZ2dlclwiXG59KS50aGVuKChhcmd2KSA9PiB7XG4gICAgdHJpZ2dlcigpO1xufSk7XG5cbnNtYXJ0Y2xpLnN0YXJ0UGFyc2UoKTsiXX0= diff --git a/dist/npmci.clean.d.ts b/dist/npmci.clean.d.ts new file mode 100644 index 0000000..d1deeeb --- /dev/null +++ b/dist/npmci.clean.d.ts @@ -0,0 +1,5 @@ +import "typings-global"; +/** + * cleans npmci config files + */ +export declare let clean: () => any; diff --git a/dist/npmci.clean.js b/dist/npmci.clean.js new file mode 100644 index 0000000..75351b3 --- /dev/null +++ b/dist/npmci.clean.js @@ -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= diff --git a/ts/index.ts b/ts/index.ts index 4f11932..3fe83d0 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -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" diff --git a/ts/npmci.clean.ts b/ts/npmci.clean.ts new file mode 100644 index 0000000..54a0604 --- /dev/null +++ b/ts/npmci.clean.ts @@ -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; +}; \ No newline at end of file