-
Notifications
You must be signed in to change notification settings - Fork 62
add sandbox schematics #73 #127
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
Awesome @sulco. We appreciate the second commit and will get to reviewing both shortly.
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.
Hey @sulco, again nice work, the sandbox schematics worked as expected when I tested it. Please fix the few small comments I made before we can merge the PR.
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.
The linked issue is in an archived repository. Please file an issue in the new repository and link it here.
Link to new repo: https://github.com/angular/angular-cli/tree/master/packages/angular_devkit
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.
Since you've set options.path to be this same value, and you don't use parsedPath anywhere else after this, I think it would make sense (for consistency) to use options.path here instead of parsedPath.path.
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.
Change these to be single quotes.
13751df to
d18534a
Compare
Hey @timstoddard, thanks for the review! The options.path is on point, and the other issues went away "on their own" - after updating "@angular-devkit/core": "^0.7.1" -> 0.7.3 booleans are read correctly, so I've updated the code to reflect that.
d18534a to
3524e02
Compare
573ec71
Adds
sandboxschematics (addresses issue #73)Will be executed when you run e.g.
ng generate angular-playground:sandbox user/avatarand will generate a sandbox file. It takes ang g c path/namegenerator)--flat(optional, defaults to "false") - that works the same way as when creating an Angular component from the CLIIn order to try this functionality locally, un the dummy Angular project's directory run:
npm uninstall angular-playgroundnpm link angular-playgroundng generate angular-playground:sandbox user/avatar--
Please do bug me if you have any questions or doubts :) I intended this PR to be a MVP for this functionality that we can build upon once it's live and kicking.
e.g. when generating a sandbox one could specify a list of scenarios (so that you don't have to write "storyOf" by hand) or to have
SandboxOfConfigconfiguration also generated.