2014-10-30 02:32:29 +01:00
|
|
|
module.exports = function(grunt) {
|
|
|
|
|
|
|
|
// build the concat config from the preen config
|
|
|
|
var components = [];
|
|
|
|
for (component in grunt.file.readJSON('bower.json').preen) {
|
2014-10-31 00:53:08 +01:00
|
|
|
components.push('components/' + component + '/**/*.js');
|
2014-10-30 02:32:29 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
grunt.initConfig({
|
|
|
|
concat: {
|
|
|
|
components: {
|
|
|
|
src: components,
|
2014-10-31 00:53:08 +01:00
|
|
|
dest: 'js/components.js',
|
2014-10-30 02:32:29 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
grunt.loadNpmTasks('grunt-preen');
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-concat');
|
|
|
|
|
|
|
|
grunt.registerTask('default', ['preen', 'concat']);
|
|
|
|
};
|