Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"use strict"
const path = require('path');
const process = require('process');
let defaultOpts = '--style=scss --routing=false --skip-git';
try {
const ngVersion = require('@angular/cli/package.json');
if (ngVersion.version.startsWith('7') ||
ngVersion.version.startsWith('8')) {
defaultOpts = defaultOpts + ' --enable-ivy'
};
} catch (error) {}
// check if user want to have exntend linking capability
const configOptions = [{
type: 'input',
message: 'What is your solution name?',
name: 'solutionName',
when: (answers) => answers.framework === 'angularelements',
default: path.basename(process.cwd()),
validate: (input) => input.indexOf('-') === -1 && input.indexOf('_') === -1 ? true : 'Dashes or underscores are not allowed in solution name'
},
{
type: 'input',
const checkAngular = () => {
try {
const ngVersion = require('@angular/cli/package.json');
if (ngVersion.version.startsWith('7')) {
return false;
};
if (ngVersion.version.startsWith('6')) {
return false;
};
return true;
} catch (error) {
// Angular is disabled because no Valid client could be found
return true;
}
"use strict"
const path = require('path');
const process = require('process');
let defaultOpts = '--style=scss --routing=false --skip-git';
try {
const ngVersion = require('@angular/cli/package.json');
if (ngVersion.version.startsWith('7') ||
ngVersion.version.startsWith('8')) {
defaultOpts = defaultOpts + ' --enable-ivy'
};
} catch (error) {}
// check if user want to have exntend linking capability
const configOptions = [{
type: 'input',
message: 'What is your solution name?',
name: 'solutionName',
when: (answers) => answers.framework === 'angularelements',
default: path.basename(process.cwd()),
validate: (input) => input.indexOf('-') === -1 && input.indexOf('_') === -1 ? true : 'Dashes or underscores are not allowed in solution name'
},
{
const checkAngular = () => {
try {
const ngVersion = require('@angular/cli/package.json');
if (ngVersion.version.startsWith('7')) {
return false;
};
if (ngVersion.version.startsWith('6')) {
return false;
};
return true;
} catch (error) {
// Angular is disabled because no Valid client could be found
return true;
}
}