jonbretman / amd-to-as6

Converts AMD modules into ES6 modules
165 stars 37 forks source link

Optional command line arg to override the input files glob? #18

Closed fhwrdh closed 8 years ago

fhwrdh commented 8 years ago

Thank you for this project, which I'm using to help migrate a large code base to ES6. This code base has a mix of .js files and .jsx files. We are not yet at a point where we want to rename those files to .js. This presented an issue for our usage of and-to-as6, as it assumes .js.

Easy enough to change the line in command-line.js to use a different glob (which we did), but it would also be easy to allow users to specify a glob on the command line to override '*/.js' if needed.

Assuming you agree this is a good idea, would you be interested in a pull request for this feature?

Thanks again.

jonbretman commented 8 years ago

Hey, glad it has been useful for you. Totally interested in a PR to add this functionality 👍 Let me know if I can help.

jonbretman commented 8 years ago

Was making some other changes and added this via a --ext argument in #19, let me know what you think.

fhwrdh commented 8 years ago

My version differed slightly in that it allowed/required the entire glob to be passed in: https://github.com/fhwrdh/amd-to-as6/commit/949490c6ff671b63c4b0c8372ed8e77e0ea37c62

Yours looks good and would have served our purposes.

Cheers!

jonbretman commented 8 years ago

Ah yeh that makes more sense, updated my PR.