Adds plain txt file output. This was added due to need for sorted globbing prior to minification. A raw glob is split into an array of path strings and is passed to the scripts of angularFileLoader task:
var myApp_pattern = "src/main/webapp/myApp/components/**/*.js";
var myApp_files = glob.sync(myApp_pattern);
function sortPathsToArray() {
var buffer = grunt.file.read('src/main/webapp/myApp/components/myApp_imports.txt');
var pathString = buffer.toString();
var myApp_files_sorted = pathString.split('\n');
// remove the start/end tags
myApp_files_sorted.pop();
myApp_files_sorted.shift();
return myApp_files_sorted;
}
Adds plain txt file output. This was added due to need for sorted globbing prior to minification. A raw glob is split into an array of path strings and is passed to the scripts of angularFileLoader task:
...
The txt file is used as a minification src, e.g:
Then, in uglify: