Loading...
Loading...
ALWAYS use when working with Angular Schematics, custom generators, code generation, or building CLI tools in Angular.
npx skill4agent add oguzhan18/angular-ecosystem-skills angular-schematicsnpm install -g @angular-devkit/schematics-cli
schematics schematics .:my-schematicimport { Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
export function myScheme(options: any): Rule {
return (tree: Tree, context: SchematicContext) => {
tree.create(options.path + '/file.ts', 'content');
return tree;
};
}import { apply, url, template } from '@angular-devkit/schematics';
export function myScheme(options: any): Rule {
const templateSource = apply(url('./files'), [
template({ ...options }),
move(options.path)
]);
return chain([mergeWith(templateSource)]);
}