Optimization - mitzerh/modulr-js GitHub Wiki
There is no need for a specific optimizer script. You can simply use any of your concat or aggregation build processes.
An example concat process from this author's generated aggregates in the demo, is using GruntJS grunt-contrib-concat
:
concat: {
demo: {
options: {
separator: ';'
},
// just include all the js files in the application folder!
files: {
"demo/js/aggregate/basic.js": [
"demo/js/basic/**/*.js"
],
"demo/js/aggregate/globals.js": [
"demo/js/package/globals/**/*.js"
],
"demo/js/aggregate/plugins.js": [
"demo/js/package/plugins/**/*.js"
],
"demo/js/aggregate/site.js": [
"demo/js/package/site/**/*.js"
]
}
}
}
And when you check the script
includes for example on the demo file https://github.com/mitzerh/ModulR/blob/master/demo/index.package.prod.html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Modulr Demo: Packages Prod</title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- here are the agreggated files -->
<script src="js/modulr.js"></script>
<script src="js/aggregate/site.js"></script>
<script src="js/aggregate/plugins.js"></script>
<script src="js/aggregate/globals.js"></script>
</head>
<body>
<div>
<ul class="status"></ul>
</div>
</body>
</html>
Essentially, you just need to aggregate the files for your applications.