firstandthird / load-grunt-config

Grunt plugin that lets you break up your Gruntfile config by task
firstandthird.github.io/load-grunt-config/
MIT License
374 stars 64 forks source link

grunt --help not showing tasks when setting jitGrunt: true #75

Closed madskristensen closed 10 years ago

madskristensen commented 10 years ago

When setting jitGrunt: true, no tasks except my statically added aliased tasks are shown in grunt --help.

Here's my grunt file:

var config = require('load-grunt-config')(grunt, {
    jitGrunt: true
});

grunt.initConfig(config);

grunt.registerTask("build", [
    "less",
    "autoprefixer",
    "concat",
    "cssmin"
]);

grunt.registerTask("default", [
    "jshint",
    "build"
]);

Running grunt --help result in this output:

Available tasks
         build  Alias for "less", "autoprefixer", "concat", "cssmin" tasks.
       default  Alias for "jshint", "build" tasks.

Whereas running with `jitGrunt: false", I get this:

Available tasks
  autoprefixer  Prefix CSS files. *
        concat  Concatenate files. *
        cssmin  Minify CSS files *
        jshint  Validate files with JSHint. *
          less  Compile LESS files to CSS *
         watch  Run predefined tasks whenever watched files change.
         newer  Run a task with only those source files that have been modified
                since the last successful run.
     any-newer  DEPRECATED TASK.  Use the "newer" task instead
 newer-postrun  Internal task.
   newer-clean  Remove cached timestamps.
         build  Alias for "less", "autoprefixer", "concat", "cssmin" tasks.
       default  Alias for "jshint", "build" tasks.
SolomoN-ua commented 10 years ago

This is not an issue. Actually this is default jit-grunt behaviour. jit-grunt is loading tasks only when it's needed, it is loading only tasks that you are trying to execute (literally that's how it saves some time during execution). And that's why you are not able to see them in list of available tasks, but at the same time you can easily execute them.

madskristensen commented 10 years ago

Thanks for clarifying