暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

target-clear.js 792B

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:clear <type> <target>")
  9. .description("clear all resources from a named resource target")
  10. .before(requireConfig_1.requireConfig)
  11. .action((type, name, options) => {
  12. const existed = options.rc.clearTarget(options.project, type, name);
  13. if (existed) {
  14. utils.logSuccess(`Cleared ${type} target ${clc.bold(name)}`);
  15. }
  16. else {
  17. utils.logWarning(`No action taken. No ${type} target found named ${clc.bold(name)}`);
  18. }
  19. return existed;
  20. });