Skip to content
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

Don't add '.js' extension if the source file doesn't have an extension #74

Closed
wants to merge 2 commits into from
Closed

Don't add '.js' extension if the source file doesn't have an extension #74

wants to merge 2 commits into from

Conversation

christophercrouzet
Copy link
Contributor

Hello!

I have in my current project a bin folder containing executable files without any extension, and I ran into the issue where these files were renamed with a .js extension after going through gulp-babel when I wished they could remain extensionless.

I've made a quick change to fix this but, as it causes a change of behaviour, this might possibly break for some users that relied on this feature for their executable files.

To keep backward compatibility, a new option could be added, possibly accepting globs as values, that would allow to filter which files are to be renamed to .js, and that would come with a default value preserving the current behaviour. I could have modified the opts parameter in this purpose but didn't dare doing so since it should remain dedicated to Babel but maybe adding a second parameter to gulp-babel could do?

Let me know!

Kind regards.

@christophercrouzet christophercrouzet changed the title Do not set a '.js' extension if the source file doesn't have any extension. Do not set a '.js' extension if the source file doesn't have an extension. Jan 23, 2016
@sindresorhus sindresorhus changed the title Do not set a '.js' extension if the source file doesn't have an extension. Don't add '.js' extension if the source file doesn't have an extension Jan 30, 2016
sindresorhus added a commit that referenced this pull request Jan 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant