Socket
Socket
Sign inDemoInstall

babelify

Package Overview
Dependencies
51
Maintainers
2
Versions
26
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.4.0 to 7.0.0

4

package.json
{
"name": "babelify",
"description": "Babel browserify transform",
"version": "6.4.0",
"version": "7.0.0",
"author": "Sebastian McKenzie <sebmck@gmail.com>",

@@ -16,3 +16,3 @@ "license": "MIT",

"dependencies": {
"babel-core": "^5.0.0",
"babel-core": "^6.0.0",
"object-assign": "^4.0.0"

@@ -19,0 +19,0 @@ },

@@ -36,3 +36,3 @@ # babelify

browserify().transform(babelify.configure({
blacklist: ["regenerator"]
presets: ["es2015"]
}))

@@ -42,32 +42,5 @@ ```

```sh
$ browserify -d -e script.js -t [ babelify --blacklist regenerator ]
$ browserify -d -e script.js -t [ babelify --presets es2015 ]
```
#### Enable Experimental Transforms
By default Babel's [experimental transforms](http://babeljs.io/docs/usage/transformers/#es7-experimental-)
are disabled. You can turn them on individually by passing `optional` as a configuration option.
```javascript
browserify().transform(babelify.configure({
optional: ["es7.asyncFunctions"]
}))
```
```sh
$ browserify -d -e script.js -t [ babelify --optional es7.asyncFunctions ]
```
Alternatively, you can enable an entire [TC39 category](http://babeljs.io/docs/usage/experimental/) of experimental ES7 features via the `stage` configuration option.
```javascript
browserify().transform(babelify.configure({
stage: 0
}))
```
```sh
$ browserify -d -e script.js -t [ babelify --stage 0 ]
```
#### Customising extensions

@@ -127,13 +100,2 @@

#### ES6 Polyfill
As a convenience, the babelify polyfill is exposed in babelify. If you've got
a browserify-only package this may alleviate the necessity to have
*both* babel & babelify installed.
```javascript
// In browser code
require("babelify/polyfill");
```
#### Babel result: metadata and others

@@ -178,5 +140,5 @@

"browserify": {
"transform": [["babelify", { "optional": ["es7.asyncFunctions"] }]]
"transform": [["babelify", { "presets": ["es2015"] }]]
}
}
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc