In grunt, you can add a "banner" to files that have been concatenated and minfied like so:
module.exports = function (grunt) {
grunt.initConfig({
cssmin: {
add_banner: {
options: {
banner: '/* My minified css file */'
},
files: {
'dist/css/dist.min.css': ["bower_components/bootstrap/dist/css/bootstrap.css", "tmp/css/dist.css"]
}
}
}
})
}
Is there a way to do a similar thing with RequireJS? I'ved looked in the example build file provided in the RequireJS documentation, but have not been able to find any such option.
You could use the wrap option of the r.js configuration:
({
...
"wrap": {
"start": "/* My minified css file */\n",
"end": ""
},
...
})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With