Skip to content

Commit

Permalink
chore: sync alpha (openedx#2932)
Browse files Browse the repository at this point in the history
chore: merging master into alpha
  • Loading branch information
viktorrusakov authored Dec 21, 2023
2 parents bdcfb17 + 5ffe031 commit 6a3a66f
Show file tree
Hide file tree
Showing 181 changed files with 1,899 additions and 1,489 deletions.
13 changes: 12 additions & 1 deletion bin/paragon-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ const buildTokensCommand = require('../lib/build-tokens');
const replaceVariablesCommand = require('../lib/replace-variables');
const buildScssCommand = require('../lib/build-scss');
const { sendTrackInfo } = require('../utils');
const versionCommand = require('../lib/version');

const commandAliases = {
'-v': 'version',
'--version': 'version',
};

const COMMANDS = {
/**
Expand Down Expand Up @@ -162,6 +168,10 @@ const COMMANDS = {
],
description: 'Displays help for available commands.',
},
version: {
executor: versionCommand,
description: 'Displays the current version of Paragon CLI.',
},
};

/**
Expand All @@ -172,7 +182,8 @@ const COMMANDS = {
*/
(async () => {
const [command, ...commandArgs] = process.argv.slice(2);
const executor = COMMANDS[command];
const resolvedCommand = commandAliases[command] || command;
const executor = COMMANDS[resolvedCommand];

if (!executor) {
// eslint-disable-next-line no-console
Expand Down
Loading

0 comments on commit 6a3a66f

Please sign in to comment.