javascript - Can't make npm scripts work with babel -


i created lib using babel.js, , don't want add dist/ folder in repository. want make npm install script build dist/ folder. how i'm trying this:

in scripts object of package.json file:

"scripts": {   "install": "scripts/install.sh" } 

the install.sh file:

#!/usr/bin/env bash  node_modules/.bin/babel ./src/ -d ./dist/ --compact --no-comments --presets=es2015,stage-2 

but when try npm install mypackage, following error message appears:

npm err! file sh npm err! code elifecycle npm err! errno enoent npm err! syscall spawn npm err! @scope/mypackage@1.1.3 install: `scripts/install.sh` npm err! spawn enoent npm err!  npm err! failed @ @scope/mypackage install script. npm err! not problem npm. there additional logging output above.  npm err! complete log of run can found in: npm err!     /users/my_user/.npm/_logs/2017-07-25t17_35_41_593z-debug.log 

any ideas why happening?


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -