https://github.com/cellular/babel-preset-cellular
Babel preset used at CELLULAR
https://github.com/cellular/babel-preset-cellular
Last synced: 10 months ago
JSON representation
Babel preset used at CELLULAR
- Host: GitHub
- URL: https://github.com/cellular/babel-preset-cellular
- Owner: cellular
- Created: 2018-02-09T13:11:37.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-04-21T20:14:17.000Z (about 6 years ago)
- Last Synced: 2025-02-15T11:19:44.844Z (over 1 year ago)
- Language: JavaScript
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# babel-preset-cellular
[](https://travis-ci.org/cellular/babel-preset-cellular)
[](https://greenkeeper.io/)
[](http://npm.im/babel-preset-cellular)
This package includes the Babel preset used at [CELLULAR](https://www.cellular.de).
Presets:
* [env](https://www.npmjs.com/package/babel-preset-env)
* [flow](https://www.npmjs.com/package/babel-preset-flow)
* [react](https://www.npmjs.com/package/babel-preset-react)
Plugins:
* [add-react-displayname](https://www.npmjs.com/package/babel-plugin-add-react-displayname)
* [glamorous-displayname](https://www.npmjs.com/package/babel-plugin-glamorous-displayname)
* [syntax-dynamic-import](https://www.npmjs.com/package/babel-plugin-syntax-dynamic-import)
* [transform-decorators-legacy](https://www.npmjs.com/package/babel-plugin-transform-decorators-legacy)
* [transform-class-properties](https://www.npmjs.com/package/babel-plugin-transform-class-properties)
* [transform-object-rest-spread](https://www.npmjs.com/package/babel-plugin-transform-object-rest-spread)
* [minify-dead-code-elimination](https://www.npmjs.com/package/babel-plugin-minify-dead-code-elimination)
When NODE_ENV or BABEL_ENV is `test`:
* [dynamic-import-node](https://www.npmjs.com/package/babel-plugin-dynamic-import-node)
## Usage in cellular-scripts projects
The easiest way to use this configuration is with [cellular-scripts](https://www.npmjs.com/package/cellular-scripts), which includes it by default. **You don’t need to install it separately.**
## Usage outside of cellular-scripts
If you want to use this Babel preset in a project not built with cellular-scripts, you can install it with following steps:
First, [install Babel](https://babeljs.io/docs/setup/).
Then install babel-preset-cellular.
```sh
npm install babel-preset-react-app --save-dev
```
Then create a file named `.babelrc` with following contents in the root folder of your project:
```js
{
presets: ["cellular"]
}
```
## Options
If your project doesn't use flow, react or glamorous you can turn off these plugins to speed up the processing:
```js
{
presets: [
[
"cellular",
{
flow: false,
react: false,
displayname: false,
glamorous: false,
}
]
]
}
```
__NOTE:__ If you use this preset with [cellular-scripts](https://www.npmjs.com/package/cellular-scripts) this will be done automatically.
# License
MIT