Conversation
Splaktar
left a comment
There was a problem hiding this comment.
Just minor nits. Looking good so far!
It's nice that you included the help text for all of the commands, even when the component schema does not.
| * found in the LICENSE file at https://angular.io/license | ||
| */ | ||
| import { addDeclarationToModule, addExportToModule } from '../utility/ast-utils'; | ||
| import {InsertChange} from '../utility/change'; |
There was a problem hiding this comment.
Inconsistent spacing within brackets :)
| noop, | ||
| normalizePath, | ||
| template, | ||
| url, |
|
|
||
| function addDeclarationToNgModule(options: any): Rule { | ||
| return (host: Tree) => { | ||
| if (options['skip-import']) { |
There was a problem hiding this comment.
This should probably be consistent with https://github.com/angular/devkit/blob/master/packages/schematics/angular/component/index.ts#L33? I'm not sure which of the two should be preferred.
| "default": true, | ||
| "description": "Specifies if a spec file is generated." | ||
| }, | ||
| "skip-import": { |
There was a problem hiding this comment.
Should be "skipImport"? Like https://github.com/angular/devkit/blob/master/packages/schematics/angular/component/schema.json#L65.
|
Thanks for the initial feedback @Splaktar! Got those code format changes made and changed skip-import to camel case. |
|
This looks good, sans the module import code which I'm refactoring for the |
|
@jschwarty PR #29 contains the updates for module resolutions. |
facf53b to
aa06a81
Compare
aa06a81 to
ee48844
Compare
The
moduleoption still needs to be implemented. I didn't see an example of that yet in thecomponentschematic so I am not sure how the desired implementation should go (looks like it will probably need aresolveModulePathutility function).@Brocco can you check this out and let me know if I got everything (besides the
moduleoption) please? 😄