Closed nfvs closed 9 years ago
Better done by a separate grunt task:
https://github.com/sindresorhus/grunt-header https://github.com/mattstyles/grunt-banner
Perhaps, but I think there is an argument to be made for doing it directly in the task, since cssmin and uglify already do it without requiring additional tasks. If all we want is a simple banner similar to what those tasks already provide, I don't think using an additional task just for banners should be required.
Issue #58 also said PRs for banners would be accepted.
(I've refactored it to not require fs
or path
and instead use grunt.file.write()
)
This is implemented by overriding the options.out parameter that is passed to requirejs.optimize(). This method will prepend the banner and write the result to the output file (since requirejs does no writing when options.out is overridden).
Related to issue #58.