-
Notifications
You must be signed in to change notification settings - Fork 12k
Schematics documentation #7627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I have no idea about what is chematics, but as it is now a way to generate app, I'd really like to see full docs. I wonder how you guys found possible to release it without any docs. VERY frustrating. |
@AloeDream, this issue is trying to clarify, first and foremost, whether this repo is even the right place for this documentation. Technically, the functionality is provided via https://github.com/angular/devkit. Ideally, documentation is also provided from that repo and maybe we get some recipes here https://github.com/angular/angular-cli/wiki/stories. But, yes, would be great to get some feedback from the team with a rough estimate on when we might expect that. My guess is that this functionality was added primarily for internal purposes and the fact that it enables users to customize is icing on the cake. In which case, documentation probably isn't the highest priority at the moment. In the meantime, you might want to consider opening a similar issue over at angular/devkit repo. |
@bmayen this feature is critical for CLI, as I go type ng help to review ng new command parameters and see that many of them disappeared and one new appeared without any explanation how to use it. So yes, I think this is the right place to at least mention where to find its docs and how it's not the highest priority, as I can't create new or update existing project without those docs? |
There should be some slides and talks coming out of AngularMix in a couple weeks which provide considerable information about Schematics. I'm unsure if there are plans to provide significant documentation on the feature before then, but hopefully soon :) Some details can be found in this blog post. |
@Brocco First of all, thanks for all the hard work on the CLI 🥇Love it. I have one quick question related to @Splaktar 's above comment. AFAIK you presented at AngularMix on the CLI/schematics, but the session was not recorded/published on the youtube channel. Is there any material (slides etc) you could make available? Thanks in advance. |
I don't believe that there were many slides in that talk. Most of it was a demo of how the schematics work. It's very unfortunate that it wasn't recorded :( I know that there is work happening to document the schematics feature. However I have no idea what the ETA might be. |
@tomwanzek schematics were on the latest Angular Air and they walk through the whole process. Thanks @Brocco! I was able to get everything working after watching the show. |
@Splaktar Thanks for the hint re ngAir...checking it out. |
@Splaktar were you able to test our your custom schematics? Following @Brocco 's instructions on the ngAir episode I ran the following commands: i than installed/built schematics-test, and npm link'd it. |
@jimdubbs Yes, I got everything working. I also ran into those Note that my solution combined the contents of I also had to add the following to the
Here's my full
|
@jimdubbs I actually just hit that error again while trying to run my schematics globally in a brand new Node environment. I resolved it by moving Then I ran into |
@Splaktar Still running into the tree.branch is not a function issue. My package.json dependencies for my schematic project is Globally I have the following installed: I've npm linked my schematics project so I should be able to access it globally. from the command line I attempt to run "schematics schematics-test:my-full-schematic --name test" from an empty folder and I get the tree.branch error. Any insight as to what Im doing wrong?do I need to have something installed locally in the directory im trying to run the schematics command from? |
Nope. @jimdubbs If you are using it via You shouldn't need
|
Can confirm I've ran npm run build in my schematics project. I've cleaned up my global installs to match yours, tried recreating a schematics project from
@Splaktar What kind of environment/project are you trying to run the schematics command from globally to use your created schematics? |
@jimdubbs The environment that I'm using to run If you are trying to use your schematics in an existing project to generate services/components, etc. then in that project's
Adding the following to that project's
You may also want to add this to your
This way you can do something like |
@Splaktar Not trying to run from an existing project, completely empty like you. Quite a frustrating error, and it seems I have an Identical setup as you. update: decided to completely remove everything and try starting from scratch. running heres my global installs:
clearly shows |
I am getting these errors too.
Using all the workarounds, I then get the error
The video is okay, but still doesn't seem to be enough to properly set this up. |
I've found that @Vaelor wouldn't it be |
@Splaktar Indeed, I've found a workaround for now - instead of testing my schematics with the Schematics binary im just using the CLI and it seems to be fine. |
There is also a video from the June MTV Angular Meetup that was just posted in October that has Hans covering Schematic concepts and demoing a number of features. |
There is also a newer schematics documentation issue here: #12149 |
Hello, I couldn't find docs about "defaults" configuration, thanks to an example I know it's possible to configure a default value with argv, but that's all. I don't know if it's possible, for example, to define a default value based on another parameter. Thanks. |
@no-more good suggestion. I've added it to an outline that is currently being worked on as part of the official schematic docs. |
Closing this issue so we can use #12149 instead. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Versions.
Latest
Desired functionality.
Very excited to see Schematics support has landed! Will usage be documented here or is this something we should look for over at angular/devkit repo?
One thing we would love to be able to do is create our own application structure. Also, additional generators for things like
lazy-loaded-feature
which contain ngModule, component ts, html, scss, etc. Are these supported use-cases?The text was updated successfully, but these errors were encountered: