-
Notifications
You must be signed in to change notification settings - Fork 11.9k
feat(@angular/create): add support for yarn create and npm init
#23492
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
Conversation
|
Points to discuss:
|
85d6c91 to
fc506e0
Compare
fc506e0 to
a84bf55
Compare
a84bf55 to
c07a45d
Compare
|
|
|
Seconded for |
|
Would the result be the same as doing |
Yes |
dgp1130
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was going to chat about this in one of the triage meetings, but since we've skipped a couple times I'll just respond here.
- should we have a snapshot build for the new package?
I don't feel too strongly about this. Any particular reasons we do / don't want a snapshot build? I get that it probably wouldn't be very useful in an unpublished context, not sure if npm init or yarn create have a means of pulling an unpublished package for testing.
- should it be
yarn create angularoryarn create @angular? We do owncreate-angular.
My feeling is that @angular is more "obviously secure". Most of our packages are under @angular/* so users should feel more confident that npm init @angular is a safe operation than npm init angular would. I don't think there's any guarantee that angular and create-angular are owned by the same group, so I would be much more hesitant to type npm init angular (fortunately we do own that and it is safe, but there's no way for a user to know that without looking).
We should definitely update npm init angular to at least fail with a clear message and suggest using npm init @angular since that is a very easy mistake to make.
| NPM | ||
|
|
||
| ``` | ||
| npm init @angular@latest [project-name] -- [...options] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Is @latest necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, for NPM this is needed as otherwise if this command was previously used, the cached binary will be used.
That's a good point, let's not do the snapshot build for now, if needed we can do that at a later stage.
We are on the same page here.
I can do a quick script and just publish to NPM repo manually. |
With this change we add support to scaffold an Angular workspace using `yarn create @angular` and `npm init @angular`. These shortcuts support all of the `ng-new` options. Closes angular#10339 and closes angular#14292
c07a45d to
8a592b7
Compare
|
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. |
With this change we add support to scaffold an Angular workspace using
yarn create @angularandnpm init @angular. These shortcuts support all of theng-newoptions.Closes #10339 and closes #14292