When I run my NodeJs (ES6) project I type in the console the following:
./node_modules/babel/bin/babel-node.js index.js
Now I would like to add this command to the script section of package.json. So I did:
"scripts": {
"run": "./node_modules/babel/bin/babel-node.js index.js"
},
Now when I run this I get:
$> npm run
Lifecycle scripts included in App:
run
./node_modules/babel/bin/babel-node.js index.js
And it doesn't run anything!
Why can't I do this? For example, if I add my test command in there it does work
"scripts": {
"test" : " ... ",
...
}
Any suggestions how I can add commands in there ?