{"action":"created","issue":{"url":"https://api.github.com/repos/Leecason/blog/issues/2","repository_url":"https://api.github.com/repos/Leecason/blog","labels_url":"https://api.github.com/repos/Leecason/blog/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/Leecason/blog/issues/2/comments","events_url":"https://api.github.com/repos/Leecason/blog/issues/2/events","html_url":"https://github.com/Leecason/blog/issues/2","id":394128921,"node_id":"MDU6SXNzdWUzOTQxMjg5MjE=","number":2,"title":"babel 相关","user":{"login":"Leecason","id":17562078,"node_id":"MDQ6VXNlcjE3NTYyMDc4","avatar_url":"https://avatars2.githubusercontent.com/u/17562078?v=4","gravatar_id":"","url":"https://api.github.com/users/Leecason","html_url":"https://github.com/Leecason","followers_url":"https://api.github.com/users/Leecason/followers","following_url":"https://api.github.com/users/Leecason/following{/other_user}","gists_url":"https://api.github.com/users/Leecason/gists{/gist_id}","starred_url":"https://api.github.com/users/Leecason/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Leecason/subscriptions","organizations_url":"https://api.github.com/users/Leecason/orgs","repos_url":"https://api.github.com/users/Leecason/repos","events_url":"https://api.github.com/users/Leecason/events{/privacy}","received_events_url":"https://api.github.com/users/Leecason/received_events","type":"User","site_admin":false},"labels":[{"id":1172602658,"node_id":"MDU6TGFiZWwxMTcyNjAyNjU4","url":"https://api.github.com/repos/Leecason/blog/labels/babel","name":"babel","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-12-26T09:45:44Z","updated_at":"2018-12-27T09:20:44Z","closed_at":null,"author_association":"OWNER","body":"摘录自 [一口(很长的)气了解 babel](https://juejin.im/post/5c19c5e0e51d4502a232c1c6)\r\n\r\n## 介绍\r\n\r\n把 JavaScript 中 es2015/2016/2017 的新语法转化为 es5，让低端运行环境(如浏览器和 node )能够认识并执行\r\n\r\n## 使用方式\r\n\r\n> 只有入口不同而已，调用的 babel 内核，处理方式都是一样的\r\n\r\n1. 使用单体文件 (standalone script)\r\n2. 命令行 (cli)  ——多见于 package.json 中的 scripts 段落中的某条命令\r\n3. 构建工具的插件 (Webpack 的 babel-loader, rollup 的 rollup-plugin-babel) ——直接集成到构建工具\r\n"},"comment":{"url":"https://api.github.com/repos/Leecason/blog/issues/comments/450112057","html_url":"https://github.com/Leecason/blog/issues/2#issuecomment-450112057","issue_url":"https://api.github.com/repos/Leecason/blog/issues/2","id":450112057,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDExMjA1Nw==","user":{"login":"Leecason","id":17562078,"node_id":"MDQ6VXNlcjE3NTYyMDc4","avatar_url":"https://avatars2.githubusercontent.com/u/17562078?v=4","gravatar_id":"","url":"https://api.github.com/users/Leecason","html_url":"https://github.com/Leecason","followers_url":"https://api.github.com/users/Leecason/followers","following_url":"https://api.github.com/users/Leecason/following{/other_user}","gists_url":"https://api.github.com/users/Leecason/gists{/gist_id}","starred_url":"https://api.github.com/users/Leecason/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Leecason/subscriptions","organizations_url":"https://api.github.com/users/Leecason/orgs","repos_url":"https://api.github.com/users/Leecason/repos","events_url":"https://api.github.com/users/Leecason/events{/privacy}","received_events_url":"https://api.github.com/users/Leecason/received_events","type":"User","site_admin":false},"created_at":"2018-12-27T09:20:44Z","updated_at":"2018-12-27T09:20:44Z","author_association":"OWNER","body":"##  Babel 7.x\r\n\r\n> 上面部分都是针对 6.x，下面是 7.x 带来的变化\r\n\r\n### preset 的变更：淘汰(非删除，不推荐使用) es201x，删除 stage-x，强推 env\r\n\r\n**凡是使用 es201x 的开发者，都应当使用 env 进行替换**\r\n\r\nstage-x 被删了，但它包含的插件并没有被删除，依然可以显式地声明这些[插件](https://github.com/babel/babel/tree/master/packages/babel-preset-stage-0#babelpreset-stage-0)来获得等价的效果\r\n\r\n### npm package 名称变化 ！！！\r\n\r\n将 `babel-x` 重命名为 `@babel/x`\r\n\r\n`babel-preset-env` => `@babel/preset-env` = `@babel/env`"}}
{"actor":{"display_login":"Leecason"}}