Reputation: 85
I have the following scripts:
"clear": "rimraf lib",
"build": "npm run clear && ./node_modules/.bin/babel --out-dir lib src",
...
When I run npm run clear
works nice!
If I run ./node_modules/.bin/babel --out-dir lib src
it does what's expected.
if I run npm run clear && ./node_modules/.bin/babel --out-dir lib src
it works fine too.
BUT if I run npm run build
I get the following error:
'.' is not recognized as an internal or external command, operable program or batch file
I'm using windows 10.
npm 5.6.0
node 7.0.0
Upvotes: 0
Views: 53
Reputation: 111
You can try the following:
"clear": "rimraf lib",
"build": "./node_modules/.bin/babel --out-dir lib src",
"clear-build": "npm run clear && npm run build",
And after that to build run:
npm run clear-build
Upvotes: 1