Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function addAppFiles(
options: XplatElectrontHelpers.SchemaApp,
appPath: string
): Rule {
const appname = getAppName(options, 'electron');
const directory = options.directory ? `${options.directory}/` : '';
return branchAndMerge(
mergeWith(
apply(url(`./_files`), [
template({
...(options as any),
...getDefaultTemplateOptions(),
appname,
xplatFolderName: XplatHelpers.getXplatFoldername(
'electron',
'angular'
)
}),
move(`apps/${directory}${appPath}`)
])
)
function addAppFiles(options: Schema, appPath: string) {
const appname = getAppName(options, 'ionic');
const directory = options.directory ? `${options.directory}/` : '';
return branchAndMerge(
mergeWith(
apply(url(`./_files`), [
template({
...(options as any),
...getDefaultTemplateOptions(),
pathOffset: directory ? '../../../' : '../../',
appname,
xplatFolderName: XplatHelpers.getXplatFoldername('ionic')
}),
move(`apps/${directory}${appPath}`)
])
)
);
}
function addAppFiles(
options: Schema,
appPath: string,
extra: string = ''
): Rule {
extra = extra ? `${extra}_` : '';
const appname = getAppName(options, 'nativescript');
const directory = options.directory ? `${options.directory}/` : '';
return branchAndMerge(
mergeWith(
apply(url(`./_${extra}files`), [
template({
...(options as any),
...getDefaultTemplateOptions(),
appname,
pathOffset: directory ? '../../../' : '../../',
xplatFolderName: XplatHelpers.getXplatFoldername('nativescript')
}),
move(`apps/${directory}${appPath}`)
])
)
);
}
function addAppFiles(
options: XplatElectrontHelpers.SchemaApp,
appPath: string
): Rule {
const appname = getAppName(options, 'electron');
const directory = options.directory ? `${options.directory}/` : '';
return branchAndMerge(
mergeWith(
apply(url(`./_files`), [
template({
...(options as any),
...getDefaultTemplateOptions(),
appname,
xplatFolderName: XplatHelpers.getXplatFoldername('electron')
}),
move(`apps/${directory}${appPath}`)
])
)
);
}
function addAppFiles(
options: Schema,
appPath: string,
extra: string = ''
): Rule {
extra = extra ? `${extra}_` : '';
const appname = getAppName(options, 'nativescript');
const directory = options.directory ? `${options.directory}/` : '';
return branchAndMerge(
mergeWith(
apply(url(`./_${extra}files`), [
template({
...(options as any),
...getDefaultTemplateOptions(),
appname,
pathOffset: directory ? '../../../' : '../../',
xplatFolderName: XplatHelpers.getXplatFoldername(
'nativescript',
'angular'
)
}),
move(`apps/${directory}${appPath}`)
])