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

Using with grunt-shipit #114

Closed vpratfr closed 9 years ago

vpratfr commented 9 years ago

I have grunt-shipit loaded and deploying my project nicely. From their documentation, I can run some tasks on some events. When using a basic Grunfile, this looks like that:

module.exports = function (grunt) {
  grunt.initConfig({
    shipit: {
      options: {        
  // (...)
      }
    }
  });

  grunt.loadNpmTasks('grunt-shipit');
  grunt.loadNpmTasks('shipit-deploy');

  // (...)

  /**
   * Initialize hooks.
   */
  grunt.shipit.on('fetched', function () {
    grunt.task.run(['build']);
  });

Using your plugin I have externalized all the shipit configuration to a shipit.yaml file. (or could also be a js file)

Now what I am missing is how can I hook into shipit ?

If I add the grunt.shipit.on('fetched', fu... code after the load-grunt-config code I get an error: TypeError: Object #<Object> has no method 'on'

PS: I am using jitGrunt as described in your README

SolomoN-ua commented 9 years ago

Hi, check this first https://github.com/shipitjs/grunt-shipit/issues/43#issuecomment-70215834 maybe it will help to resolve your issue

jgallen23 commented 9 years ago

closing this. reopen if you still have issues