1

I am learning Grunt and want to use load-grunt-config to start with. Here is my code :

 Gruntfile.js  
  module.exports = function (grunt){
    var path = require('path');
    require('load-grunt-config')(grunt, {
      configPath: path.join(process.cwd(), 'grunt-tasks'),

    });
    grunt.registerTask('install',['test']);
  };

I have grunt-tasks folder in root directory of my project along with Gruntfile.js and in that I have included test.js

 test.js
 module.exports = {
    test :{
        local : {
        }
    }
 };

Now when I say grunt install from command line and using CWD as my project's root directory I get following error :

 Warning: Task "test" not found. Use --force to continue.

and when I include following segment in Gruntfile.js

  loadGruntTasks : {
        pattern : '*'
    }

I get following error :

>> Local Npm module "load-grunt-config" not found. Is it installed?
   Warning: Task "test" not found. Use --force to continue.

  May I know what I don't understand here?
Shailesh Vaishampayan
  • 1,766
  • 5
  • 24
  • 52
  • Maybe this can help you : [How to create and organise config and register grunt tasks](http://stackoverflow.com/questions/33804659/how-to-create-and-organise-config-and-register-grunt-tasks/33805887#33805887) – Louis Barranqueiro Nov 22 '15 at 12:46

0 Answers0