-
Notifications
You must be signed in to change notification settings - Fork 141
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
PR: Add an option for a banner (#45) #62
Conversation
A banner is a string prepended to the specified output file. Closes gruntjs#45. Closes gruntjs#62.
PR: Add an option for a banner (#45)
Awesome. Thanks man :D |
Thanks @drublic you are my hero :) |
Wheee! |
It looks to me that this may be breaking the sourcemaps references. If I don't add the banner option, sourcemap references in Chrome 29 all point to the correct lines in the correct files. If I do include the banner option, they are all pointing to the wrong place (file and line). I'm just guessing here, but if the banner is added after the sourcemap has made the map, that may cause problems. If the sourcemap logic determines that line 17 of the rendered CSS points to primary.scss line 39, and then you add a 3 line banner, line 17 is now 20 and so doesn't track to the correct scss file and line any more. Could that be the problem? Can anyone confirm the issue? |
Based on the documentation update to say that the banner option isn't compatible with the sourcemap option, is the above issue something that can't be fixed? Or is that documentation update just a placeholder until it is fixed? |
@aaronbarker it might be possible to fix if there's a module that let's put in a file + sourcemap, modify the file, then get an updated sourcemap. Not that i know of though. So the easiest right now is to just make them mutually exclusive. PR welcome though. |
Poked around and found this gruntjs/grunt-contrib-uglify#22 so we aren't the only one with the problem. Will continue to ponder on it. Thanks. |
Is there a solution for the grunt-contrib-compass plugin? Maybe we can adapt this? |
Nope |
Bummer. |
A banner is a string prepended to the specified output file.
This Pull Request closes #45.
Inspired by gruntjs/grunt-contrib-compass#18.