Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
(tree: Tree, context: SchematicContext) =>
options.needsIndex
? addToFeature(
'',
'component',
options,
'libs',
tree,
'_base_index',
true
)(tree, context)
: noop()(tree, context),
// adjust libs barrel
(tree: Tree, context: SchematicContext) =>
!options.onlyProject && options.createBase
? addToFeature('', 'component', options, 'libs', tree, '_base', true)(
tree,
context
)
: noop()(tree, context),
// adjust libs barrel for subFolder
(tree: Tree, context: SchematicContext) =>
!options.onlyProject && options.createBase
? adjustBarrelIndex(
'component',
options,
`libs/features/${componentSettings.featureName}/base/index.ts`,
false,
true
)(tree, context)
: noop()(tree, context),
// add index barrel if needed
export default function(options: XplatComponentHelpers.Schema) {
return chain(ComponentHelpers.platformGenerator(options, 'nativescript'));
}
export default function(options: XplatComponentHelpers.Schema) {
return chain(ComponentHelpers.platformGenerator(options, 'web'));
}
export default function(options: XplatComponentHelpers.Schema) {
return chain(ComponentHelpers.platformGenerator(options, 'ionic'));
}
(tree: Tree, context: SchematicContext) =>
options.needsIndex
? addToFeature('', 'component', options, 'libs', tree, '_base_index')(
tree,
context
)
: noop()(tree, context),
export default function(options: featureOptions) {
return generate('service', options);
}
export default function(options: featureOptions) {
return generate('directive', options);
}