Created
November 15, 2012 18:12
-
-
Save dcherman/4080211 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // JSHint chokes when a UTF8 file is read that includes the BOM. | |
| // This bug is fixed in grunt versions >= 0.4, but include the fix | |
| // for previous versions as well since 0.4 is still in development / unstable. | |
| // https://github.com/cowboy/grunt/issues/338 | |
| // https://github.com/cowboy/grunt/commit/44b57274ceba147e24dcc121ed7d9b84e6ec4e49 | |
| if ( parseFloat(grunt.version) < 0.4 ) { | |
| var _readFile = grunt.file.read; | |
| grunt.file.read = function() { | |
| var src = _readFile.apply( this, arguments ); | |
| if (typeof src === 'string' && src.charCodeAt(0) === 0xFEFF) { | |
| src = src.substring(1); | |
| } | |
| return src; | |
| }; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment