-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update README.md #7140
Update README.md #7140
Conversation
The previous version of the api allowed passing ignore options as a function, which now can only be an array of regex / functions. The current docs are somewhat ambiguous with regards to this breaking change. Anyway I did some editing, let me know if this is ok with you guys.
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/6421/ |
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/6399/ |
packages/babel-register/README.md
Outdated
if (filename === "/path/to/es6-file.js") { | ||
return false; | ||
} else { | ||
// Optional ignore array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you could add something to make it clear that the file will be ignored if it matches any of the ignore
entries?
[skip-ci]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Qantas94Heavy Let me know if that works.
packages/babel-register/README.md
Outdated
} else { | ||
// Array of ignore conditions ( Optional ) | ||
// A condition can be either a regex, or a function. | ||
// When a file path **matchs** this regex then then it is **not** compiled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// When a file path matches this regex then it is not compiled.
packages/babel-register/README.md
Outdated
if (filename === "/path/to/es6-file.js") { | ||
return false; | ||
} else { | ||
// Array of ignore conditions ( Optional ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit remove spaces surrounding Optional
packages/babel-register/README.md
Outdated
return true; | ||
} | ||
}], | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's fix this indention
@eladchen thanks for the PR! |
@existentialism My pleasure. |
The previous version of the api allowed passing ignore option as a function, which now can only be an array of regex / functions.
The current docs are somewhat ambiguous with regards to this breaking change.
Anyway I did some editing, let me know if this is ok with you guys.
[skip ci]