角度示意图:externalSchematic ng-new无法正常工作

时间:2020-08-06 16:07:45

标签: angular angular-schematics

我已经构建了一个自定义原理图。我可以使用以下命令通过自定义逻辑示意图生成Angular组件:schematics ./fast/src/collection.json:fast project_name --debug=false在逻辑示意图的父文件夹中。

但据推测,此命令也应该起作用: ng new project_name --configuration=fast

尽管运行该命令,但出现以下错误: An unhandled exception occurred: Schematic "ng-new" not found in collection "fast".

有人可以帮我吗?

谢谢!

这可能与我的index.ts中的这段代码有关:

function generateRepo(name: string): Rule {
 return externalSchematic('@schematics/angular', 'ng-new', {
   name,
   version: '*',
   directory: name,
   routing: false,
   style: 'scss',
   inlineStyle: false,
   inlineTemplate: false
 });
}

Github Repo和我的代码: https://github.com/nearmint/angular-fast-serve

0 个答案:

没有答案