Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
hzoo
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
31.
▲
by
hzoo
9y ago
It's just about moving a dependency up a level of node_modules if they are compatible. So if for example 2 packages A and B have the same dependency on babel-core, instead of node_modules/A/node_modules/babel-core and no
32.
▲
by
hzoo
9y ago
You don't have to use Babel, but if you want to use newer/syntax not in Node/v8 then yes. Always a tradeoff, but gave a talk at TC39 recently about this, https://github.com/hzoo/role-of-babel-in-js , htt
33.
▲
by
hzoo
9y ago
Yeah it's definetely a lot of work on both ends (also means would need to coordinate releases of both like we do with flow) but hopefully this helps the ecosystem that wants to use both (seems to be an increasingly higher number of peo
34.
▲
by
hzoo
9y ago
Yep, and we (Babel) are trying to work with TS on integrating it into Babel similar to how flow works with Babel (parser support + a plugin/preset to strip types). Again, limited resources so if the community really wants it, we would
35.
▲
by
hzoo
9y ago
Yep it is! https://twitter.com/dan_abramov/status/859817680857165824
36.
▲
by
hzoo
10y ago
I haven't heard of this either. I guess they just wanted something that worked with minimal effort. Making the plugin and writing/coming up with spec tests takes time but albeit a better effort for the community overall. Maybe we
37.
▲
by
hzoo
10y ago
Thanks! Will be working torward making the preset-env + babel-minify combo work much better soon.
38.
▲
by
hzoo
10y ago
FYI we do have an issue open about TS https://github.com/babel/babylon/issues/320 so that we could eventually support TS in Babel as a plugin and then create the same strip-types-plugin just like Flow.
39.
▲
by
hzoo
10y ago
We don't support custom syntax that isn't already a proposal (meaning it has potential to be in JS), and we also encourage using presets like https://github.com/babel/babel-preset-env instead of providing you
40.
▲
by
hzoo
10y ago
The purpose of Babel/transpilers is to eventually allow users to use the native versions of language features. Native support will eventually be faster (not at first), will result in less code sent to users (compiled code is larger), a
41.
▲
by
hzoo
10y ago
Yep and with Babel we recommend using https://github.com/babel/babel-preset-env to compile only what's missing in the targets you support. Hopefully we have a better solution about making multiple bundles (separat
42.
▲
by
hzoo
10y ago
For JavaScript we have https://github.com/estree/estree as our JS AST spec for parsers like esprima, acorn, babylon (under a config flag), etc. JSCS ( https://github.com/jscs-dev/node-jscs ) (now me
43.
▲
by
hzoo
10y ago
https://github.com/babel/babel-preset-env/ should help with this to remove the polyfills that are already supported, and with some future work to remove polyfills are unused.
44.
▲
by
hzoo
10y ago
Might be a good chance to suggest using our new preset: https://github.com/babel/babel-preset-env/ . TL;DR - automate your Babel config options based on targets. babel-preset-env: A Babel preset that can automatica
45.
▲
Show HN: Babel-preset-env, auto determines required Babel plugins based on env
(github.com)
3 points
by
hzoo
10y ago
|
0 comments
46.
▲
by
hzoo
10y ago
Yep! > We also presented Traceur at NodeConf 2011. The video is available on YouTube [1] [1] https://www.youtube.com/watch?feature=player_detailpage&v=nt...
47.
▲
by
hzoo
10y ago
Awesome! What's one of them? Hope to see you around then!
48.
▲
by
hzoo
10y ago
Author here, if anyone had questions or wanted to know more about how to help out! Personally, I'm most excited about babel-preset-env, and fixing how we work with the TC39 process via experimental plugins, and working with the commun
49.
▲
by
hzoo
10y ago
Haha fixed - or it can be a joke on the output being larger.
50.
▲
by
hzoo
10y ago
There's actually a useBuiltins option to remove the _extends helper if you want to use that. https://babeljs.io/docs/plugins/transform-object-rest-spread... Might be cool in combination with preset-env
51.
▲
by
hzoo
10y ago
I know jlongster started https://github.com/jlongster/jscodefmt https://twitter.com/jlongster/status/804888882408026113 which uses recast/babylon
52.
▲
by
hzoo
10y ago
You might be interested in https://github.com/babel/babel-preset-env :D. (I'm working on it so let me know if you have questions)
53.
▲
by
hzoo
10y ago
I think it depends on the project like mentioned. For react, the docs for the website is in the same repo as the main code under "docs/" https://github.com/facebook/react/tree/master/docs .
54.
▲
by
hzoo
10y ago
This is a great start! Contributing can be a lot more than just PRs though: - answering questions on stack overflow, chat (irc, gitter, slack) - creating a minimal code repro, checking for duplicates, checking if a bug is fixed in a later
55.
▲
by
hzoo
10y ago
Not the best way to find an open source project to contribute to but you can check trending per language https://github.com/trending/csharp or the top starred repos that are C# https://github.com/search
56.
▲
by
hzoo
10y ago
Right! And a lot of projects have a linter in place that runs in continuous integration (travis, etc) that you can see in the PR or just locally. In Babel we use ESLint for this https://github.com/babel/babel/blob&
57.
▲
by
hzoo
10y ago
For those using Babel already or want to use ES6+ on a set of supported browsers: we have started work on https://github.com/babel/babel-preset-env . Would appreciate more testing! It allows passing in a set of supporte
58.
▲
by
hzoo
10y ago
Working on https://github.com/babel/babel-preset-env right now which should help with this
59.
▲
by
hzoo
10y ago
You can use node specific preset like other's have mentioned but working on https://github.com/babel/babel-preset-env for all future versions as well
60.
▲
by
hzoo
10y ago
I've been working on https://github.com/babel/babel-preset-env/ and there's a similar request although using babel-polyfill rather than the service https://github.com/babel/babel-pre
More ›