https://github.com/babel/babili/blob/master/packages/babili/...
I was thinking about using bundledDependencies or maybe just running webpack/rollup over the whole thing, feel free to make an issue.
266 karma · joined March 28, 2016
https://github.com/babel/babili/blob/master/packages/babili/...
I was thinking about using bundledDependencies or maybe just running webpack/rollup over the whole thing, feel free to make an issue.
Yeah there's multiple JavaScript parsers: esprima, acorn, shift, babylon (uglify has their own parser I think).
There was an effort to standardize as well in https://github.com/estree/estree.
EDIT:
However, in Babel 6 there were a few (nice) incompatible changes to the AST which was unfortunate for interop and other tools (https://github.com/babel/babel-eslint had to make a lot of changes).
I don't want to speak for him, but I think a lot of the decisions to fork (parser, etc) at the time were most likely made like mentioned above to move faster. And at the time, Sebastian was basically the only one working on it. Maybe more context from his post: https://medium.com/@sebmck/2015-in-review-51ac7035e272#.qcyz...
Made a Babel transform real quick for this particular example:
Also https://twitter.com/samccone/status/722826060161617923.
Also opened a PR for discussion about adding an environment award preset in babel or supporting it in core at https://github.com/babel/babel/pull/3476.
for (let [key, value] of Object.entries({a: 1})) { console.log(key, value); }
FYI: in reference to https://twitter.com/rauchg/status/712799807073419264
npm i -D babel-cli babel-preset-es2015 babel-preset-stage-0 babel-plugin-transform-runtime
echo "export default async function requireFromTwitter (id) {}" > index.js
echo '{ "presets": ["es2015","stage-0"], "plugins": ["transform-runtime"] }' > .babelrc
./node_modules/.bin/babel-node index.js
npm install --save-dev babel-cli babel-preset-es2015
echo '{ "presets": ["es2015"] }' > .babelrc
echo "console.log(`1 + 1 = ${1 + 1}`);" > index.js
./node_modules/.bin/babel-node index.js.
I would link to http://babeljs.io/docs/usage/cli/ since users wouldn't get what babel-node vs babel is.
The init cli is certainly something we should do; I mentioned this in a comment below.(issue is https://phabricator.babeljs.io/T6956)