Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

npm yarn run shell script

// Step 1 - Permissions
$ chmod u+x ./cmd1.sh
// Step 2 - Shebang (top of file cmd1.sh)
$ #!/usr/bin/env bash
// Step 3 - Config
"scripts": {
  "cmd1": "bash ./cmd1.sh"
}
// Step 4 - Run
$ yarn/npm run cmd1
 
PREVIOUS NEXT
Tagged: #npm #yarn #run #shell #script
ADD COMMENT
Topic
Name
4+6 =