-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
RFC: Schematics ng-add
implementation
#920
Comments
Yep, all for this. |
Great, I'll prepare PR |
@robwormald, @brandonroberts: Does it make more sense for the |
Good question. I think it might be a little confusing if you add store to an application and it gets set up, but you can't generate anything else unless you then install schematics, which would run its initial setup also. |
It is possible to use any platform package without the schematic, so IMHO only schematic package should implement Another point here that |
+1 to Mike - that’s the right mental model for ng add. Let’s go with this. |
Additional question, should |
@brandonroberts, as per discussion to implement |
@brandonroberts, could you take a look at PR. For now, I just created |
So, if every package (e.g. So ideally a PR would need the |
In that PR I split Copy / Paste from the PR (which is a WIP):
Open questions:
|
In #999 I moved utilities to root, removed
Angular Material has some good angular-cli 6 schematics stuff: https://github.com/angular/material2/tree/master/src/lib/schematics I probably won't touch this too much the rest of the weekend |
Adding support for |
I guess I misinterpreted the comments above. I'll add schematics back, but it seems like |
@brandonroberts , should we go in that direction or may be better to keep |
Please keep it separated - we use the ngrx schematics inside of google, but
not via the CLI (we don’t use ng add)
…On Sat, Apr 28, 2018 at 2:25 PM Vitaliy Bobrov ***@***.***> wrote:
@brandonroberts <https://github.com/brandonroberts> , should we go in
that direction or may be better to keep ng-add in schematics module?
If no, could you give core team vision how to re-use schematics code?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#920 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAgpkvAnaxCV_SdQ_uziapnomOEol16fks5ttN4vgaJpZM4Sxpfk>
.
|
@vitaliy-bobrov seems like
It seems like all So, this would work...
Next step would be to add an And if you take that a step further... What I was suggesting, is that if you follow the intent of |
Roger that @robwormald |
I think I was mis-understanding some things related to collections/schematics in general, so I closed my PR until I mentally re-group |
Hold on before creating any new PRs. I'll give an update this week |
I want to proceed with additional
|
For For |
@vitaliy-bobrov Hi, I got a question. I was just toying around with I created a new project and added @ngrx/store which works. Then I created a new module and tried to add @ngrx/store to it, but I keep getting the error that the module does not exist.
|
|
Yea that is what I thought initially, but I saw it has a |
You had already run ¯\(ツ)/¯ I had opened #1143 a few days ago that was similar to this but it had already been fixed in master / hadn't been released yet (I didn't check non-app.module.ts modules though). Try |
I'm submitting a...
There is the new command introduced for
@angular/cli
v6.0.0-beta.5 (and will be part of v6 final release) calledng add
. What does it do? It fetches schematic collection from npm registry according to passed collection name and executesng-add
schematic from that collection. It should be used for initial automatic setup of the library inside users project. We could implement suchng-add
schematic for@ngrx/schematics
package to produce store and feature setup like it described here by calling store and feature schematics.Flow example:
ng add @ngrx/schematics
+ additional arguments needed.ng-add
schematics from the ngrx collectionGreat article by @manfredsteyer for the reference.
The text was updated successfully, but these errors were encountered: