grunt-gaze

A simpler, faster watcher for grunt with livereload.

npm install grunt-gaze
1 downloads in the last week
6 downloads in the last month

grunt-gaze

A simpler, faster watcher for grunt with livereload.

Sample configuration

Compiles LESS file and triggers livereload when css file is written

grunt.initConfig({
  less: {
    web: {
      files: {
        "dist/web.css": "css/web.less"
      }
    }
  },

  gaze: {
    less: {
      files: ["css/*.less"],
      tasks: ["less"]
    },
    livereload: {
      files: ["dist/*"],
      options: {
        livereload: true
      }
    }
  }
});

grunt.registerTask("default", ["less", "gaze"]);

Server

Also includes a simple execution wrapper for your development server (gazed)

grunt.initConfig({
  gazed: {
    dev: {
      args: "--harmony app.js",
      env: {
        NODE_PATH: process.cwd()
      }
    }
  },

  "gaze": {
    server: {
      files: ["app.js", "routes/**/*.js"],
      tasks: ["gaze-server"]
    }
  }
});

grunt.registerTask("default", ["gaze-server", "gaze"]);
npm loves you