Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function(options: any): Rule {
const fullPath = path.join(options.directory, toFileName(options.name), options.sourceDir);
const templateSource = apply(url('./files'), [template({ ...options, ...names(options.name), dot: '.', tmpl: '' })]);
return chain([branchAndMerge(chain([mergeWith(templateSource), addLibToAngularCliJson(fullPath, options)]))]);
}
export default function(options: any): Rule {
const fullPath = path.join(options.directory, toFileName(options.name), options.sourceDir);
const templateSource = apply(url('./files'), [template({ ...options, ...names(options.name), dot: '.', tmpl: '' })]);
return chain([branchAndMerge(chain([mergeWith(templateSource), addLibToAngularCliJson(fullPath, options)]))]);
}
export default function(options: Schema): Rule {
const fullPath = path.join(options.directory, toFileName(options.name), options.sourceDir);
return chain([
mergeWith(apply(url('./files'), [template({ ...options, ...names(options.name), dot: '.', tmpl: '' })])),
externalSchematic('@schematics/angular', 'module', {
name: 'app',
commonModule: false,
flat: true,
routing: options.routing,
sourceDir: fullPath,
spec: false
}),
externalSchematic('@schematics/angular', 'component', {
name: 'app',
selector: `${options.prefix}-root`,
sourceDir: fullPath,
flat: true,
inlineStyle: options.inlineStyle,