Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function normalizeOptions(host: Tree, options: Schema): NormalizedSchema {
const appDirectory = options.directory
? `${toFileName(options.directory)}/${toFileName(options.name)}`
: toFileName(options.name);
const appProjectName = appDirectory.replace(new RegExp('/', 'g'), '-');
const e2eProjectName = `${appProjectName}-e2e`;
const appProjectRoot = `apps/${appDirectory}`;
const e2eProjectRoot = `apps/${appDirectory}-e2e`;
const parsedTags = options.tags
? options.tags.split(',').map(s => s.trim())
: [];
const defaultPrefix = getNpmScope(host);
return {
...options,
prefix: options.prefix ? options.prefix : defaultPrefix,
function normalizeOptions(host: Tree, options: Schema): NormalizedSchema {
const appDirectory = options.directory
? `${toFileName(options.directory)}/${toFileName(options.name)}`
: toFileName(options.name);
const appProjectName = appDirectory.replace(new RegExp('/', 'g'), '-');
const e2eProjectName = `${appProjectName}-e2e`;
const appProjectRoot = normalize(`apps/${appDirectory}`);
const e2eProjectRoot = normalize(`apps/${appDirectory}-e2e`);
const parsedTags = options.tags
? options.tags.split(',').map(s => s.trim())
: [];
const fileName = options.pascalCaseFiles ? 'App' : 'app';
const styledModule = /^(css|scss|less|styl)$/.test(options.style)
? null
function normalizeOptions(host: Tree, options: Schema): NormalizedSchema {
const appDirectory = options.directory
? `${toFileName(options.directory)}/${toFileName(options.name)}`
: toFileName(options.name);
const appProjectName = appDirectory.replace(new RegExp('/', 'g'), '-');
const e2eProjectName = `${appProjectName}-e2e`;
const appProjectRoot = normalize(`apps/${appDirectory}`);
const e2eProjectRoot = normalize(`apps/${appDirectory}-e2e`);
const parsedTags = options.tags
? options.tags.split(',').map(s => s.trim())
: [];
const fileName = options.pascalCaseFiles ? 'Index' : 'index';
const styledModule = /^(css|scss|less|styl)$/.test(options.style)
? null
: options.style;
function normalizeOptions(host: Tree, options: Schema): NormalizedSchema {
const appDirectory = options.directory
? `${toFileName(options.directory)}/${toFileName(options.name)}`
: toFileName(options.name);
const appProjectName = appDirectory.replace(new RegExp('/', 'g'), '-');
const e2eProjectName = `${appProjectName}-e2e`;
const appProjectRoot = normalize(`apps/${appDirectory}`);
const e2eProjectRoot = normalize(`apps/${appDirectory}-e2e`);
const parsedTags = options.tags
? options.tags.split(',').map(s => s.trim())
: [];
const fileName = options.pascalCaseFiles ? 'App' : 'app';
const styledModule = /^(css|scss|less|styl)$/.test(options.style)
? null
: options.style;
function normalizeOptions(
host: Tree,
options: Schema,
context: SchematicContext
): NormalizedSchema {
const name = toFileName(options.name);
const projectDirectory = options.directory
? `${toFileName(options.directory)}/${name}`
: name;
const projectName = projectDirectory.replace(new RegExp('/', 'g'), '-');
const fileName = projectName;
const projectRoot = normalize(`libs/${projectDirectory}`);
const parsedTags = options.tags
? options.tags.split(',').map(s => s.trim())
: [];
const normalized: NormalizedSchema = {
...options,
fileName,
routePath: `/${name}`,
name: projectName,
projectRoot,
function normalizeOptions(options: Schema): Schema {
const name = toFileName(options.name);
return { ...options, name };
}
function normalizeOptions(options: Schema): NormalizedSchema {
const appDirectory = options.directory
? `${toFileName(options.directory)}/${toFileName(options.name)}`
: toFileName(options.name);
const appProjectRoot = join(normalize('apps'), appDirectory);
return {
...options,
appProjectRoot
};
}
function normalizeOptions(options: Schema): Schema {
return {
...options,
directory: toFileName(options.directory)
};
}
function normalizeOptions(options: Schema): NormalizedSchema {
const appDirectory = options.directory
? `${toFileName(options.directory)}/${toFileName(options.name)}`
: toFileName(options.name);
const appProjectRoot = join(normalize('apps'), appDirectory);
return {
...options,
appProjectRoot
};
}