4 ms·
This is a point that is brought up a lot, and I'm happy that our community is having these discussions, but I don't think that this is the best place to bring i
by kylec 10y ago
This is a point that is brought up a lot, and I'm happy that our community is having these discussions, but I don't think that this is the best place to bring it up again. This post is intended to convey a lot of technical, inside information about this tool to people who are already using it. If you don't know where to begin with Babel, this is not a good resource.
Also, constant negative feedback discourages the creators and maintainers of projects like this from continuing to work on them:
https://medium.com/@thejameskyle/dear-javascript-7e14ffcae36c https://medium.com/@thejameskyle/dear-javascript-7e14ffcae36...
- ggregoire 10y agoBy the way, it's absolutely painless to setup Babel. To use ES6/ES7/ES8 (e.g. async/await), it's just: npm install --save-dev babel-cli babel-preset-latest And then in the package.json: "scripts": { "build": "babel src -d dist --presets latest" }
- bostonvaulter2 10y agoThat's definitely not the impression given by the setup page: http://babeljs.io/docs/setup/ http://babeljs.io/docs/setup/ I'm an experienced front-end developer and I must say that that list is intimidating.
- shriek 10y agoYou really don't have to use all of them of course. Pick one and that should be good for the environment that's specified there.
- bostonvaulter2 10y agoThat's definitely not the impression given by the setup page: http://babeljs.io/docs/setup/ http://babeljs.io/docs/setup/ I'm an experienced front-end developer and I must say that that list is intimidating.
- zodiac 10y agoTo be fair that assumes you have node and npm set up properly, including making them upgradable, making sure node_modules is in PATH, etc. I think it's easy to forget "obvious" knowledge like this that (for me at least) had to be figured out with some trial and error.
- Klathmon 10y agoBut npm comes with node, so it's just installing the language at that point. And you don't need `node_modules` in the PATH, npm-run scripts will search the local node_modules first before hitting the path. But I do agree with your point. The "bootstrapping" process of getting started in a new ecosystem is always extremely exhausting. When i was first learning python, it took me 2 solid weeks of an hour or so a night to build my first package. From getting the right version installed, having to eventually compile it myself, getting pip installed, accidentally using setuptools directly, learning about virtualenvironments, trashing everything and starting over with a venv, getting told by people on stack-overflow that I shouldn't try messing with packages at all as I don't need them and should just install from git, etc... And just recently I did something similar while revisiting an older PHP codebase. I realized that just getting it in a position where I could run it on the dev machine meant installing a database, language, server, setting up a web root, a shitton of apache config files, and more just to get to a point where I could print hello-world. That part always sucks, and to be completely honest node-js was the one that sucked the least to me when I first started in that world. At least for windows, it was "download this MSI installer and run it, and now you can npm install stuff". It might be different on other platforms, but it was definitely a breath of fresh air there.
- vacri 10y ago> getting told ... that I shouldn't try messing with packages at all as I don't need them and should just install from git This is my pet hate, except when it's clearly a newbie question. It's usually something like: "Hi, how do I [do unusual thing]?" > "Oh, you shouldn't be doing that, ever." > "Well, this is why I'm trying to do it and the reasonable constraints involved" > "oh, didn't think of that, here's a way to do it". Irritating as hell.