Node.js equivalent of Yarn command

Node.js equivalent of Yarn command



I'm going through js-stack-from-scratch using Node, not Yarn.



In the PM2 (Process Manager) section we are to add
"prod:build": "rimraf lib && babel src -d lib --ignore .test.js"
to the "scripts" section of package.json, and then to run yarn prod:build.
I need the Node equivalent please.


"prod:build": "rimraf lib && babel src -d lib --ignore .test.js"


"scripts"


yarn prod:build



(I got around the previous Nodemon section by substituting dev:start for dev-start but this doesn't work for prod:build, presumably because this time it's on the command line)


dev:start


dev-start


prod:build




1 Answer
1



npm run prod:build should do the trick.


npm run prod:build






Did you mean npm run prod:build, because this works?

– Mark Wade
Sep 9 '18 at 18:57


npm run prod:build






Yes! :) Sorry, typo.

– Ioan
Sep 9 '18 at 19:04



Thanks for contributing an answer to Stack Overflow!



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown




By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.