-
Notifications
You must be signed in to change notification settings - Fork 155
Conversation
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent spacing within brackets :)
noop, | ||
normalizePath, | ||
template, | ||
url, |
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.
Comma not needed?
|
||
function addDeclarationToNgModule(options: any): Rule { | ||
return (host: Tree) => { | ||
if (options['skip-import']) { |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
module
option still needs to be implemented. I didn't see an example of that yet in thecomponent
schematic so I am not sure how the desired implementation should go (looks like it will probably need aresolveModulePath
utility function).@Brocco can you check this out and let me know if I got everything (besides the
module
option) please? 😄