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) => {
const xplatFolderName = XplatHelpers.getXplatFoldername('web', 'angular');
// console.log('xplatName:', xplatName);
return options.skipDependentPlatformFiles
? noop()
: XplatHelpers.addPlatformFiles(options, xplatFolderName)(
tree,
context
);
},
(tree: Tree, context: SchematicContext) => {
(tree: Tree, context: SchematicContext) => {
const xplatFolderName = XplatHelpers.getXplatFoldername(
'nativescript',
'angular'
);
// console.log('xplatName:', xplatName);
// console.log('options:', options);
return options.skipDependentPlatformFiles
? noop()
: XplatHelpers.addPlatformFiles(options, xplatFolderName)(
tree,
context
);
},
XplatHelpers.updateTsConfigPaths(options, { framework: 'angular' }),
(tree: Tree, context: SchematicContext) => {
const xplatFolderName = XplatHelpers.getXplatFoldername(
'ionic',
'angular'
);
// console.log('xplatName:', xplatName);
return options.skipDependentPlatformFiles
? noop()
: XplatHelpers.addPlatformFiles(options, xplatFolderName)(
tree,
context
);
},
XplatHelpers.updateTsConfigPaths(options, { framework: 'angular' }),
(tree: Tree, context: SchematicContext) => {
const xplatFolderName = XplatHelpers.getXplatFoldername(
'electron',
'angular'
);
// console.log('xplatName:', xplatName);
return options.skipDependentPlatformFiles
? noop()
: XplatHelpers.addPlatformFiles(options, xplatFolderName)(
tree,
context
);
},
XplatHelpers.updateTsConfigPaths(options, { framework: 'angular' }),
(tree: Tree, context: SchematicContext) => {
if (tree.exists('/xplat/web/scss/_index.scss')) {
// may have already generated support
return noop()(tree, context);
} else {
return XplatHelpers.addPlatformFiles(options, 'web')(tree, context);
}
},
XplatHelpers.updateTsConfigPaths(options),
export default function(options: XplatHelpers.Schema) {
return chain([
prerun(options),
options.skipDependentPlatformFiles
? noop()
: XplatHelpers.addPlatformFiles(options, 'nativescript'),
XplatNativeScriptHelpers.updateRootDeps(options),
XplatNativeScriptHelpers.updatePrettierIgnore()
]);
}