4 ms·
>It's unfortunate they don't have `npm install --save-dev babel babel-preset-es2015` and "write `{"presets":"es2015"}` to a new .babelrc file" smack-bang at the
by kevan 11y ago
>It's unfortunate they don't have `npm install --save-dev babel babel-preset-es2015` and "write `{"presets":"es2015"}` to a new .babelrc file" smack-bang at the top of the homepage though.
I think this would be a great first step towards making startup for new users less painful. Or maybe making an onboarding process similar to `npm init`, where the user is walked through a series of questions about what they need for their project and the initial .babelrc is generated automatically.
- hzoo 11y agoYeah I think we can try adding something like that to the homepage. 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/ 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 https://phabricator.babeljs.io/T6956)