pixelblock-cli
Advanced tools
Comparing version 0.0.13 to 0.0.14
@@ -6,2 +6,3 @@ #!/usr/bin/env node | ||
const { Command } = require('commander'); | ||
const { execSync } = require('child_process'); | ||
@@ -11,4 +12,4 @@ const program = new Command(); | ||
program | ||
.argument('<component>', 'Component name to install') | ||
.action((component) => { | ||
.argument('<component>', 'Component name to install') | ||
.action(async (component) => { | ||
const templatesDir = path.join(__dirname, '../components'); | ||
@@ -25,2 +26,11 @@ const projectRoot = process.cwd(); | ||
console.log(`Component ${component} installed successfully.`); | ||
// Attempt to install dependencies | ||
try { | ||
console.log('Installing dependencies...'); | ||
execSync(`cd ${destinationDir} && npm install clsx tailwind-merge`, { stdio: 'inherit' }); | ||
console.log('Dependencies installed successfully.'); | ||
} catch (error) { | ||
console.error(`Failed to install dependencies: ${error.message}`); | ||
} | ||
} else { | ||
@@ -31,2 +41,2 @@ console.error(`Component ${component} not found.`); | ||
program.parse(process.argv); | ||
program.parse(process.argv); |
{ | ||
"name": "pixelblock-cli", | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"main": "bin/install.js", | ||
@@ -10,2 +10,3 @@ "bin": { | ||
"@types/react": "^18.3.3", | ||
"clsx": "^2.1.1", | ||
"commander": "^12.1.0", | ||
@@ -15,3 +16,4 @@ "fs-extra": "^11.2.0", | ||
"react": "^18.3.1", | ||
"react-dom": "^18.0.0" | ||
"react-dom": "^18.3.1", | ||
"tailwind-merge": "^2.3.0" | ||
}, | ||
@@ -18,0 +20,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
11343
234
8
1
+ Addedclsx@^2.1.1
+ Addedtailwind-merge@^2.3.0
+ Addedclsx@2.1.1(transitive)
+ Addedtailwind-merge@2.6.0(transitive)
Updatedreact-dom@^18.3.1