import { strings } from '@angular-devkit/core'; import { apply, mergeWith, Rule, SchematicContext, template, Tree, url } 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 workspace(_options: any): Rule { return (tree: Tree, _context: SchematicContext) => { const {name} = _options; const src = url('./files'); const processedSource = apply(src, [ template({ ..._options, ...strings, dot: '.' }) ]) return mergeWith(processedSource); }; }