babel-preset-cellular
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -8,2 +8,3 @@ module.exports = function(api, options) { | ||
glamorous: true, | ||
displayname: true, | ||
builtIns: true, // switch to 'usage' in Babel 7, | ||
@@ -33,2 +34,5 @@ modules: isTestEnv ? 'commonjs' : false, | ||
const plugins = [ | ||
opts.react && | ||
opts.displayname && | ||
require.resolve('babel-plugin-add-react-displayname'), | ||
require.resolve('babel-plugin-syntax-dynamic-import'), | ||
@@ -35,0 +39,0 @@ require.resolve('babel-plugin-transform-decorators-legacy'), |
{ | ||
"name": "babel-preset-cellular", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Babel preset used at CELLULAR", | ||
"repository": "fgnass/babel-preset-cellular", | ||
"repository": "cellular/babel-preset-cellular", | ||
"author": "Felix Gnass <fgnass@cellular.de>", | ||
@@ -17,2 +17,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"babel-plugin-add-react-displayname": "0.0.5", | ||
"babel-plugin-dynamic-import-node": "^1.2.0", | ||
@@ -32,4 +33,4 @@ "babel-plugin-glamorous-displayname": "^2.1.0", | ||
"eslint": "^4.17.0", | ||
"eslint-config-cellular": "^1.0.0" | ||
"eslint-config-cellular": "^2.0.0" | ||
} | ||
} |
# babel-preset-cellular | ||
[![Build Status](https://travis-ci.org/fgnass/babel-preset-cellular.svg?branch=master)](https://travis-ci.org/fgnass/babel-preset-cellular) [![Greenkeeper badge](https://badges.greenkeeper.io/fgnass/babel-preset-cellular.svg)](https://greenkeeper.io/) | ||
[![Build Status](https://travis-ci.org/cellular/babel-preset-cellular.svg?branch=master)](https://travis-ci.org/cellular/babel-preset-cellular) | ||
[![Greenkeeper badge](https://badges.greenkeeper.io/cellular/babel-preset-cellular.svg)](https://greenkeeper.io/) | ||
[![version](https://img.shields.io/npm/v/babel-preset-cellular.svg)](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 | ||
@@ -27,4 +47,30 @@ | ||
{ | ||
"presets": ["cellular"] | ||
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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
5608
65
75
12
+ Addedbabel-plugin-add-react-displayname@0.0.5(transitive)
+ Addedcaniuse-lite@1.0.30001684(transitive)
- Removedcaniuse-lite@1.0.30001683(transitive)