No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

target-remove.js 826B

1234567891011121314151617181920
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.command = void 0;
  4. const clc = require("colorette");
  5. const command_1 = require("../command");
  6. const requireConfig_1 = require("../requireConfig");
  7. const utils = require("../utils");
  8. exports.command = new command_1.Command("target:remove <type> <resource>")
  9. .description("remove a resource target")
  10. .before(requireConfig_1.requireConfig)
  11. .action((type, resource, options) => {
  12. const name = options.rc.removeTarget(options.project, type, resource);
  13. if (name) {
  14. utils.logSuccess(`Removed ${type} target ${clc.bold(name)} from ${clc.bold(resource)}`);
  15. }
  16. else {
  17. utils.logWarning(`No action taken. No target found for ${type} resource ${clc.bold(resource)}`);
  18. }
  19. return Promise.resolve(name);
  20. });