DEV Community

[Comment from a deleted post]
Collapse
 
drozerah profile image
Drozerah • Edited

You mean:

myFiles.js

console.log('Hello from myFiles.js!');
Enter fullscreen mode Exit fullscreen mode

package.json

{
  //..
  "scripts": {
    "get-ss-prebuild": "node myFile.js" // your JS file to execute
  },
  //...
}
Enter fullscreen mode Exit fullscreen mode

usage:

npm run get-ss-prebuild
Enter fullscreen mode Exit fullscreen mode

terminal says:

Hello from myFiles.js!
Enter fullscreen mode Exit fullscreen mode
Collapse
 
syn profile image
norman

Hmm. It's supposed to download a repository release from GitHub

Collapse
 
drozerah profile image
Drozerah

"download a repository release from GitHub"
As far as i understand, this is the job that is supposed to be done by your js file and your question is formulated about running it with a npm script and not how to make the job done by the file itself...

 
syn profile image
norman

thanks