I would like to run an npm script that contains cd folderName/
or cd ../www/folderName/
but it seems that npm is unable to run the cd
command nor is it able to run the cp
command (i installed cpx which seems to work well with it).
Any solution for a script that npm will run that allows me to change directories?
Thanks!
Update:
Ok this is one of the npm scripts that I need cd
for ..
"buildWWW": "babel-node tools/build.js && cpx 'dist/*.{js,map,css,ico}' '../www/public' && cd ../www/ && node app.js"
replacing cd ../www/ && node app.js
with node ../www/app.js
is not an option.
Update #2: Simple test case