Replies: 3 comments 1 reply
-
Hi @salmoro, It's not easy to define what is the intended behavior for the extension, because as there is nearly no official documentation for the schematics API, the extension has been built empirically based on how the default Angular CLI schematics work. In Angular CLI schematics:
So currently the extension works exactly the same way, but it does so not by hard-coding some options, but by following the schematics schema. It does filter options with:
So if your schematics does not set the Is it possible to see your schematics code to check on a real example?
Also can you point me to this documentation? |
Beta Was this translation helpful? Give feedback.
-
@cyrilletuzi Thanks for the quick reply. Just looked at Angular's Schematics source code and I see that indeed they derive the path from the name option as you mentioned above. Here's the mention in the docs:
you can see it at the following link: https://angular.io/guide/schematics-for-libraries BTW, the path is only available when using I don't have anything I can share right but if it'll be helpful I'll get you an example ASAP. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hi @salmoro, for information, an extended version of the extension is now available: Schematics Pro. It has more advanced Angular features, but is also framework agnostic. Which means that it is no longer tied to the Angular CLI opacity and complexity. It just takes a few minutes to create custom schematics in Schematics Pro, with just a declarative configuration file (no headache logic code like in Angular CLI) and a templating syntax widely known and natively supported by VS Code (Handlebars). You will find all the details on the dedicated website. Cheers. |
Beta Was this translation helpful? Give feedback.
-
Hi there and thanks for this neat extension.
I am authoring a schematics and I'm relying on the options.path which is available by default when running
ng g my-collection:my-schematics
from within a given directory (as mentioned in the angular documentation for schematics). Trying this extension seems that it always runs from the project root and thereforepath
is not supplied by schematics.Thanks!
Beta Was this translation helpful? Give feedback.
All reactions