3 ms·
So, one more step than normal if you want to use npm dependencies in the browser, which is what you described. If you're just playing with code, here's a simpl
by ajacksified 11y ago
So, one more step than normal if you want to use npm dependencies in the browser, which is what you described.
If you're just playing with code, here's a simpler workflow:
* npm install babel
* write file.js
* run `babel-node file.js`
Similar to your example, the only extra step here is installing babel. If it's excruciating, install it globally and save yourself forever.
- untog 11y agoEven better, just npm install -g babel once on any machine you use. Then it's ready for any and every .js file.
- cholantesh 11y agoOurs is a .NET shop and we don't have plans to update to VS2015 in the near future. Does this workflow suggest that, in order to take advantage of Babel, we will have to install npm on all our dev machines and servers?
- Touche 11y agodev machines yes.
- Touche 11y agoWell I have to run it every time I edit a file, maybe you missed the second half of my steps, so I still need a watch mode thingy which means probably a build script like virtually everyone using Babel is doing. Regardless, vi index.html is much simpler.