Skip to content

Commit

Permalink
Adds tool instalation to the CLI (#106)
Browse files Browse the repository at this point in the history
### Description
This PR enhances the KaibanJS CLI by including `@kaibanjs/tools`
installation during the KaibanJS installation process. The installation
function now installs both `kaibanjs` and `@kaibanjs/tools` packages,
providing users with a more complete setup experience.

### Changes
- Modified `installKaibanJS` function in `xscripts/cli.mjs` to install
`@kaibanjs/tools` along with `kaibanjs`.
- Updated spinner and error messages to reflect the change.

### Impact
This change simplifies the installation process by automating the setup
of essential tools alongside KaibanJS.

### Test Plan
- Verified that running the CLI with the modified install command
installs both `kaibanjs` and `@kaibanjs/tools`.
  • Loading branch information
darielnoel authored Nov 2, 2024
2 parents 2e1b1c7 + 2f3840e commit 395ae6a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions xscripts/cli.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -391,13 +391,13 @@ function isKaibanJSInstalled() {

// Function to install KaibanJS
function installKaibanJS() {
const spinner = ora('Installing KaibanJS...').start();
const spinner = ora('Installing KaibanJS and tools...').start();
try {
execSync('npm install kaibanjs --legacy-peer-deps', { stdio: 'inherit' });
spinner.succeed('KaibanJS installed successfully.');
execSync('npm install kaibanjs @kaibanjs/tools --legacy-peer-deps', { stdio: 'inherit' });
spinner.succeed('KaibanJS and tools installed successfully.');
} catch (error) {
spinner.fail('Failed to install KaibanJS.');
console.error(chalk.red('Error installing KaibanJS:'), error);
spinner.fail('Failed to install KaibanJS and tools.');
console.error(chalk.red('Error installing packages:'), error);
process.exit(1);
}
}
Expand Down

0 comments on commit 395ae6a

Please sign in to comment.