Skip to content

Commit

Permalink
Remove a variable to check ng 17
Browse files Browse the repository at this point in the history
  • Loading branch information
dxvladislavvolkov committed Nov 25, 2024
1 parent 5903a2b commit 776c3e1
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions packages/devextreme-cli/src/applications/application.angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ const latestVersions = require('../utility/latest-versions');
const { extractToolingVersion, toolingVersionOptionName } = require('../utility/extract-tooling-version');
const schematicsVersion = latestVersions['devextreme-schematics'] || 'latest';

const minNgCliVersion = new semver('16.0.0');
const ngCliWithStandalone = new semver('17.0.0');
const minNgCliVersion = new semver('17.0.0');

async function runSchematicCommand(schematicCommand, options, evaluatingOptions) {
const collectionName = 'devextreme-schematics';
Expand Down Expand Up @@ -77,21 +76,18 @@ const install = async(options) => {

const create = async(appName, options) => {
const layout = await getLayoutInfo(options.layout);
const currentNgVersion = ngVersion.getNgCliVersion().version;

const commandArguments = [
'new',
appName,
'--style=scss',
'--routing=false',
'--skip-tests=true',
'--skip-install=true'
'--skip-install=true',
'--standalone=false',
'--ssr=false'
];

if(ngCliWithStandalone.compare(currentNgVersion) <= 0) {
commandArguments.push('--standalone=false', '--ssr=false');
}

await runNgCommand(commandArguments, options);

const appPath = path.join(process.cwd(), appName);
Expand Down

0 comments on commit 776c3e1

Please sign in to comment.