cartodb-4.42/lib/build/tasks/concat.js
2024-04-06 05:25:13 +00:00

25 lines
537 B
JavaScript

/**
* Concat assets generation task
*/
var srcToDestHash = function (files, basePath, fileExt) {
var hash = {};
for (var f in files) {
if (f[0] !== '_') {
hash[basePath + f + fileExt] = files[f];
}
}
return hash;
};
exports.task = function () {
return {
js: {
files: srcToDestHash(require('../files/js_files'), '<%= editor_assets_dir %>/javascripts/', '.js')
},
css: {
files: srcToDestHash(require('../files/css_files'), '<%= editor_assets_dir %>/stylesheets/', '.css')
}
};
};