I am currently trying to create my own custom Angular Schematics. I have the following:
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 pxSchematics(options: any): Rule {
return (tree: Tree, _context: SchematicContext) => {
tree.create(options.name || 'hello', 'world');
return tree;
};
}
Which just creates a file with 'hello world'. How would I alter the file path for the tree, so that it outputs the file in a custom directory of sorts? Thank you.