Compare commits

...

3 Commits

Author SHA1 Message Date
Sebastian McKenzie
fcbd315bc1 v1.10.12 2014-11-07 13:53:15 +11:00
Sebastian McKenzie
71646f4ade register: fix ignoreRegex compatibility check 2014-11-07 13:52:13 +11:00
Sebastian McKenzie
e5f1eb64b6 clarify default ignore in 6to5/register 2014-11-07 13:41:24 +11:00
3 changed files with 11 additions and 3 deletions

View File

@@ -190,7 +190,15 @@ require("6to5/register");
```
**NOTE:** By default all requires to `node_modules` will be ignored. You can
override this by passing an ignore regex with`.
override this by passing an ignore regex via options.
```javascript
require("6to5/register")({
// This will override `node_modules` ignoring - you can alternatively pass
// a regex
ignore: false
});
```
##### Options

View File

@@ -97,7 +97,7 @@ module.exports = function (opts) {
// normalise options
opts = opts || {};
if (_.isRegExp(opts)) opts = { ignore: opts };
opts.ignore = opts.ignore || opts.ignoreRegex;
if (opts.ignoreRegex != null) opts.ignore = opts.ignoreRegex;
if (opts.only != null) onlyRegex = opts.only;
if (opts.ignore != null) ignoreRegex = opts.ignore;

View File

@@ -1,7 +1,7 @@
{
"name": "6to5",
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
"version": "1.10.11",
"version": "1.10.12",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://github.com/sebmck/6to5",
"repository": {