scalableminds / amd-optimize

An AMD (RequireJS) optimizer that's stream-friendly. Made for gulp.
MIT License
162 stars 29 forks source link

Option to not modify the source contents file for development accuracy #52

Closed dhill-rmn closed 9 years ago

dhill-rmn commented 9 years ago

I am using the module to work out which files are needed and to copy them into another build directory. The problem whilst debugging is that the output file does not exactly match the source file, because the escodegen generate method strips out new lines, and a bunch of other things. For development it would make sense to have an option like preserveFiles that will not modify the file, so that the output contents ends up being the same as the source file. I believe I see the fix but want to run it by you, perhaps there is another option that can be passed to the escodegen generate that I've not seen. I'll send a pull request soon. thanks

normanrz commented 9 years ago

Thanks for sending the PR. I just included it in a new version.