grunt-file-order
Advanced tools
Helpers for ordering files
Weekly downloads
Readme
A grunt extension for ordering files after selection.
Adds order
attribute to both config files
and grunt.file.expand
.
$ npm install --save grunt-file-order
files
require('grunt-file-order'); // global addition to grunt
module.exports = function (grunt, options) {
return {
copyFiles: {
files: [
{
expand: true,
src: ['<%= sourcedir %>**'],
dest: '<%= outputdir %>',
order: function(filepaths) {
// sort alphabetically
return filepaths.sort(function(a,b) {
return a>b ? 1 : a<b ? -1 : 0;
});
}
}
]
}
};
};
grunt.file.expand
require('grunt-file-order'); // global addition to grunt
var sourcedir = "./src";
var files = grunt.file.expand({
order: function(filepaths) {
// sort alphabetically
return filepaths.sort(function(a,b) {
return a>b ? 1 : a<b ? -1 : 0;
});
}
}, sourcedir);
FAQs
Helpers for ordering files
The npm package grunt-file-order receives a total of 405 weekly downloads. As such, grunt-file-order popularity was classified as not popular.
We found that grunt-file-order demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.