Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/github/babel-preset-github
GitHub.com's Babel configuration
https://github.com/github/babel-preset-github
babel babel-preset configuration javascript transpiler
Last synced: 3 months ago
JSON representation
GitHub.com's Babel configuration
- Host: GitHub
- URL: https://github.com/github/babel-preset-github
- Owner: github
- License: mit
- Archived: true
- Created: 2018-08-09T15:15:49.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-08-14T08:10:40.000Z (over 5 years ago)
- Last Synced: 2024-09-25T21:08:13.946Z (4 months ago)
- Topics: babel, babel-preset, configuration, javascript, transpiler
- Language: JavaScript
- Size: 104 KB
- Stars: 108
- Watchers: 5
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome - babel-preset-github - GitHub.com's Babel configuration (JavaScript)
README
# babel-preset-github
This is a Babel preset which GitHub.com uses to transpile our JavaScript. It supports ES2018, plus a few extra non-standard features which we use to make development easier.
Pull requests that fix bugs are welcome. We will likely only add new plugins as they are needed for the GitHub.com codebase.
To install you need node and npm:
```bash
$ npm i -D babel-preset-github
```Then use the preset in your `.babelrc`
```json
{
"presets": ["github"]
}
```This example only includes the polyfills and code transforms needed for a specific list of browsers that GitHub supports. You can change this by passing in a valid browserlist:
```json
{
"presets": [
["github", {
"targets": {
"browsers": ["last 2 versions", "safari >= 7"]
}
}]
]
}
```### LICENSE
The project is available as open source under the terms of the [MIT License](LICENSE).
When using the GitHub logos, be sure to follow the [GitHub logo guidelines](https://github.com/logos).