npm-script-selector
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -19,3 +19,3 @@ #!/usr/bin/env node | ||
ProgramName: 'NPM Script Selector', | ||
Version: '1.0.2', | ||
Version: '1.0.3', | ||
Description: 'A CLI for finding npm scripts within a package and allowing a user to run them from the command line.', | ||
@@ -53,2 +53,6 @@ Options: { | ||
const selectedScript = answers.selectedScript; | ||
// Get the directory of the package.json file | ||
const packageDir = path.dirname(filePath); | ||
// Change the current working directory to the package directory | ||
process.chdir(packageDir); | ||
// Execute the selected script using `npm run` | ||
@@ -55,0 +59,0 @@ exec(`npm run ${selectedScript}`, (error, stdout, stderr) => { |
{ | ||
"name": "npm-script-selector", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "A command line app for finding and running npm scripts within a project.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -12,3 +12,3 @@ #!/usr/bin/env node | ||
ProgramName: 'NPM Script Selector', | ||
Version: '1.0.2', | ||
Version: '1.0.3', | ||
Description: 'A CLI for finding npm scripts within a package and allowing a user to run them from the command line.', | ||
@@ -50,2 +50,9 @@ Options: { | ||
const selectedScript = answers.selectedScript; | ||
// Get the directory of the package.json file | ||
const packageDir = path.dirname(filePath); | ||
// Change the current working directory to the package directory | ||
process.chdir(packageDir); | ||
// Execute the selected script using `npm run` | ||
@@ -52,0 +59,0 @@ exec(`npm run ${selectedScript}`, (error, stdout, stderr) => { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
169351761
847