Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions packages/devextreme-cli/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
#!/usr/bin/env node
const args = require('minimist')(process.argv.slice(2), {
alias: { v: 'version' }
const rawArgs = process.argv.slice(2);
const hasEmptyFlag = rawArgs.some(arg => arg === '--empty' || arg.startsWith('--empty='));

const args = require('minimist')(rawArgs, {
alias: { v: 'version' },
boolean: ['empty']
});

const commands = args['_'];
delete args['_'];

// Remove empty flag if it wasn't explicitly provided to prevent passing it to commands that don't support it
if(!hasEmptyFlag) {
delete args.empty;
}
const themeBuilder = require('./src/themebuider');
const application = require('./src/application');
const devextremeConfig = require('./src/utility/devextreme-config');
Expand Down
Loading