'use strict'; /*jslint es5: true, node: true, indent: 2 */

module.exports = function(grunt) {
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    handlebars: {
      all: {
        templates: 'templates/**/*.bars',
        root: 'templates',
        extension: 'bars',
        output: 'static/templates.js',
      }
    },
    uglify: {
      all: {
        options: {
          mangle: false
        },
        files: {
          'static/compiled.js': [
            'static/lib/json2.js',
            'static/lib/underscore.js',
            'static/lib/jquery.js',
            'static/lib/backbone.js',
            'static/lib/jquery.flags.js',
            'static/lib/cookies.js',
            'static/lib/handlebars.runtime.js',
            // 'static/local.js',
          ]
        }
      }
    }
  });

  grunt.loadNpmTasks('grunt-contrib-handlebars');
  grunt.loadNpmTasks('grunt-contrib-uglify');

  grunt.registerTask('default', ['handlebars','uglify']);
};

'use strict'; /*jslint es5: true, node: true, indent: 2 */

module.exports = function(grunt) {
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    handlebars: {
      all: {
        templates: 'templates/**/*.bars',
        root: 'templates',
        extension: 'bars',
        output: 'static/templates.js',
      }
    },
    uglify: {
      all: {
        options: {
          mangle: false
        },
        files: {
          'static/compiled.js': [
            'static/lib/json2.js',
            'static/lib/underscore.js',
            'static/lib/jquery.js',
            'static/lib/backbone.js',
            'static/lib/jquery.flags.js',
            'static/lib/cookies.js',
            'static/lib/handlebars.runtime.js',
            // 'static/local.js',
          ]
        }
      }
    }
  });

  grunt.loadNpmTasks('grunt-contrib-handlebars');
  grunt.loadNpmTasks('grunt-contrib-uglify');

  grunt.registerTask('all', ['handlebars', 'uglify']);
  grunt.registerTask('default', ['uglify']);
};

Remove handlebars precompile from normal Grunt run.
Remove handlebars precompile from normal Grunt run.
