6to5-browserify
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -12,6 +12,11 @@ var through = require("through"); | ||
opts = opts || {}; | ||
opts.sourceMap = opts.sourceMap !== false ? "inline" : false; | ||
if (opts.sourceMap !== false) opts.sourceMap = "inline" ; | ||
if (opts.extensions) opts.extensions = to5._util.arrayify(opts.extensions); | ||
if (opts.ignore) opts.ignore = to5._util.regexify(opts.ignore); | ||
if (opts.only) opts.only = to5._util.regexify(opts.only); | ||
return function (filename) { | ||
if ((opts.ignore && opts.ignore.test(filename)) || !to5.canCompile(filename, opts.extensions)) { | ||
if ((opts.ignore && opts.ignore.test(filename)) || | ||
(opts.only && !opts.only.test(filename)) || | ||
!to5.canCompile(filename, opts.extensions)) { | ||
return through(); | ||
@@ -18,0 +23,0 @@ } |
{ | ||
"name": "6to5-browserify", | ||
"description": "6to5 browserify plugin", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"author": "Sebastian McKenzie <sebmck@gmail.com>", | ||
@@ -15,3 +15,3 @@ "homepage": "https://github.com/sebmck/6to5-browserify", | ||
"dependencies": { | ||
"6to5": "^1.11.4", | ||
"6to5": "^1.12.21", | ||
"through": "2.3.4", | ||
@@ -18,0 +18,0 @@ "lodash": "^2.4.1" |
@@ -51,8 +51,14 @@ # 6to5-browserify | ||
#### Ignoring files | ||
#### Additional options | ||
```javascript | ||
browserify().transform(to5Browserify.configure({ | ||
ignore: /your_regex_here/ | ||
// Optional ignore regex - if any filenames **do** match this regex then they | ||
// aren't compiled | ||
ignore: /regex/, | ||
// Optional only regex - if any filenames **don't** match this regex then they | ||
// aren't compiled | ||
only: /my_es6_folder/ | ||
})) | ||
``` |
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
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
4348
5
40
64
Updated6to5@^1.12.21