Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return (host: Tree, context: SchematicContext) => {
options.path = getProjectPath(host, options);
if (options.module) {
options.module = findModuleFromOptions(host, options);
}
const parsedPath = parseName(options.path, options.name || '');
options.name = parsedPath.name;
options.path = parsedPath.path;
const templateSource = apply(url('./files'), [
options.spec
? noop()
: filter(path => !path.endsWith('.spec.ts.template')),
options.minimal ? filter(_ => false) : noop(),
applyTemplates({
...stringUtils,
'if-flat': (s: string) =>
stringUtils.group(
options.flat ? '' : s,