grunt-brunch

Grunt Brunch wrapper

Drive Brunch with Grunt

Run Brunch.IO as a Grunt task

Install this grunt plugin next to your project's grunt.js gruntfile with: npm install grunt-brunch

Then add this line to your project's grunt.js gruntfile:

grunt.loadNpmTasks('grunt-brunch');

Configuration:

grunt.initConfig({
  ...
  brunch: {
    // Watch and run server at 8888
    serve: {
      action: 'serve',
      port: 8888
    },
    // Just like 'serve' but an asnchronous task
    serveAsync: {
      action: 'serve',
      port: 8888,
      async: true
    },
    // Watch for file changes only
    watch: {
      action: 'watch',
      port: 8888
    },
    // Compile
    compile: {
      action: 'compile'
    },
    // Build (compile + minify + uglify)
    build: {
      action: 'build'
    }
  },
  ...
});