How can you do this:
you need to export your concat configuration and require it in your Gruntfile (base node.js)!
I would recommend putting the entire configuration of each task in one file with the name after the configuration (in this case, I called it concat.js ).
Also, I moved concat.js to a folder called grunt
Gruntfile.js
module.exports = function(grunt) { grunt.initConfig({ concat: require('grunt/concat')(grunt); }); };
footman / concat.js
module.exports = function getConcatConfiguration(grunt) {
How you SHOULD do this:
there was already someone who created a module called load-grunt-config . it does exactly what you want.
go and put everything (as mentioned above) in separate files to your chosen location (default ist grunt folder).
then your standard grunt file should look something like this:
module.exports = function(grunt) { require('load-grunt-config')(grunt);
source share