Last active
February 1, 2018 00:36
-
-
Save hansl/7d3f8c485dc151ed1bdb5fc0d5a8e051 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics'; | |
// You don't have to export the function as default. You can also have more than one rule factory | |
// per file. | |
export function myComponent(options: any): Rule { | |
return (tree: Tree, _context: SchematicContext) => { | |
tree.create(options.name || 'hello', 'world'); | |
return tree; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment