Skip to content

Instantly share code, notes, and snippets.

@anfibiacreativa
Created August 6, 2020 11:20
Show Gist options
  • Save anfibiacreativa/b2bb69cb0bd34d95f0b328ef26b754a7 to your computer and use it in GitHub Desktop.
Save anfibiacreativa/b2bb69cb0bd34d95f0b328ef26b754a7 to your computer and use it in GitHub Desktop.
import { Rule, SchematicContext, Tree, chain, schematic, externalSchematic } 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 miSchematicPaisa(_options: any): Rule {
return chain([
schematic('modificadorMedellin', _options),
chain([externalSchematic('@schematics/angular','component', _options),
(tree: Tree, _context: SchematicContext) => {
_context.logger.info('Soy el schematic paisa');
tree.create('holaMedellin.txt', '¡Hola Medellín!');
return tree;
},
])
])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment