Open roberttuttle opened 9 years ago
Thanks Robert, looking into an even friendlier option of preserving line-endings. Should have it fixed up by the end of the day.
Commit 1cb101f168670c8bfb426d64af42f4c9e39c4539 and corresponding release 0.1.0 address this issue. Seeing as there are currently no tests and I don't use windows, I can't say for sure if this has solved the problem. Local testing seems good though. If you'd be kind enough to try using the new version and let me know if it works, that'd be great.
Added bonus, in theory this should support MacOS < OSX with the even more ridiculous \r line endings.
Since I can't do a push and submit a pull request (your repo is locked down), here is a fix to allow processString to work when the files are sourced in a Windows / CRLF line-ending environment. If carriage returns are left in place, acorn.js throws an "unterminated string constant" error as part of the ES6 transpile.
(Lines 45 and 46 to be added). Thanks! ... 44: try { 45: // Don't assume *nix line endings. Strip off any carriage returns before proceeding further. 46: string = string.replace(/\r/gm,""); 47:
48: // Clean up the string and then split it 49: if (this.trimFiles) { ...