var grunt = require('grunt');

module.exports = function(grunt) {

  //Project configuration
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    jshint: {
      src: ['Gruntfile.js', 'server.js', 'app/app.js', 'public/js/**/*.js'],
      options: {
        curly: true,
        eqeqeq: true,
        immed: true,
        latedef: true,
        newcap: true,
        noarg: true,
        sub: true,
        undef: true,
        boss: true,
        eqnull: true,
        browser: true,
        smarttabs: true,
        globals: {
          require: true,
          define: true,
          requirejs: true,
          describe: true,
          expect: true,
          it: true
        },
        node: true
      }
    },
    watchify: {
      options: {
        debug: true
      },
      example: {
        src: ['./app/app.js'],
        dest: 'public/bundle.js'
      },
    },

    appcache: {
      options: {
        // Task-specific options go here.
      },
      all: {
				dest: 'public/manifest.appcache',
				cache: ['index.html'] //'bundle.js']//['bundle.js', 'index.html']
			}
		}

  });
};



// Load JSHint task
grunt.loadNpmTasks('grunt-contrib-jshint');

// Default task.

grunt.loadNpmTasks('grunt-appcache');
grunt.loadNpmTasks('grunt-watchify');

// Default task.
grunt.registerTask('default', ['watchify', 'jshint']); //, 'appcache'

var grunt = require('grunt');

module.exports = function(grunt) {

  //Project configuration
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    jshint: {
      src: ['Gruntfile.js', 'server.js', 'app/app.js', 'app/**/*.js', '!public/js/*.js'],
      options: {
        curly: true,
        eqeqeq: true,
        immed: true,
        latedef: true,
        newcap: true,
        noarg: true,
        sub: true,
        undef: true,
        boss: true,
        eqnull: true,
        browser: true,
        smarttabs: true,
        globals: {
          require: true,
          define: true,
          requirejs: true,
          describe: true,
          expect: true,
          it: true
        },
        node: true
      }
    },
    watchify: {
      options: {
        debug: true,
        keepalive: true
      },
      example: {
        src: ['./app/app.js'],
        dest: 'public/bundle.js'
      },
    },

    appcache: {
      options: {
        // Task-specific options go here.
      },
      all: {
				dest: 'public/manifest.appcache',
				cache: ['index.html'] //'bundle.js']//['bundle.js', 'index.html']
			}
		}

  });
};

// Load JSHint task
grunt.loadNpmTasks('grunt-contrib-jshint');

// Default task.

grunt.loadNpmTasks('grunt-appcache');
grunt.loadNpmTasks('grunt-watchify');

// Default task.
grunt.registerTask('default', ['watchify', 'jshint']); //, 'appcache'

fix grunt configs. And watch for file changes forever