I'm using requirejs with Grunt in my project. I could able to successfully perform the folder level optimization through grunt-requirejs
tool as below.
requirejs : {
std: {
options: {
mainConfigFile: 'src/js/main.js',
appDir: "src",
baseUrl: "js",
dir: "dist",
modules: [
{
name: "main"
}
],
removeCombined: true,
wrap: true,
almond: true,
replaceRequireScript: [{
files: ['dist/index.html'],
module: 'main'
}]
}
}
}
All the js files are concatenated and minified in main.js
and css files in style.css
. How can I rename these files main.js
and style.css
into something like app.min.js
and app.min.css
. Can I able to accomplish this using r.js
or I've to use some external plugin?