Tencent / tdesign-starter-cli

CLI tool for TDesign Starter kit
MIT License
36 stars 13 forks source link

优化代码 #81

Closed RSS1102 closed 1 week ago

RSS1102 commented 3 weeks ago

[ \ ] 1. cli 参数支持下载Starter模板 关键代码

      case 'template':
            if (!['lite', 'all'].includes(options['template'])) {
              spinner.fail(chalk.red('template 参数错误,请输入lite | all'));
              isValid = false;
              break outerLoop;
            }
            break;
          case 'buildToolType':
            if (!['vite', 'webpack', 'farm'].includes(options['buildToolType'])) {
              spinner.fail(chalk.red('buildToolType 参数错误,请输入vite | webpack | farm'));
              isValid = false;
              break outerLoop;
            }
            break;

先判断template是什么类型,

github-actions[bot] commented 3 weeks ago

👋 @RSS1102,感谢给 TDesign 提出了 issue。 请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

github-actions[bot] commented 3 weeks ago

♥️ 有劳 @uyarn 尽快确认问题。 确认有效后将下一步计划和可能需要的时间回复给 @RSS1102 。