<commit_before>'use strict';

var timeGrunt = require('time-grunt'),
    loadTasks = require('load-grunt-tasks');

var jspaths = {
  server: ['app.js', 'globals.js', 'test/**/*.js', 'lib/**/*.js', '!node_modules/**/*.js', '!build/**/*.js', '!dist/**/*.js'],
  support: ['Gruntfile.js']
};

module.exports = function (grunt) {

  // time grunt
  timeGrunt(grunt);

  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    clean: {
      build: ['build']
    },
    jshint: {
      options: {
        jshintrc: true
      },
      server: jspaths.server,
      support: jspaths.support
    },
    watch: {
      server: {
        files: jspaths.server,
        tasks: ['server:debug']
      },
      support: {
        files: jspaths.support,
        tasks: ['support:debug']
      }
    },
    mochaTest: {
      options: {
        reporter: 'spec'
      },
      debug: {
        src: ['test/specs/**/*.js']
      },
      release: {
        src: ['test/integration/*.js']
      }
    },
    bump: {
      options: {
        updateConfigs: ['pkg'],
        commitFiles: ['package.json', 'CHANGELOG.md'],
        pushTo: 'origin'
      }
    },
    changelog: {
      options: {
        repository: '<%= pkg.repository.url %>'
      }
    }
  });

  // load tasks
  loadTasks(grunt);

  grunt.registerTask('support:debug', ['jshint:support']);
  grunt.registerTask('server:debug', ['jshint:server', 'mochaTest:debug']);
  grunt.registerTask('server:release', ['mochaTest:release']);

  grunt.registerTask('notes:minor', ['bump-only:minor', 'changelog', 'bump-commit']);
  grunt.registerTask('notes:major', ['bump-only:major', 'changelog', 'bump-commit']);
  grunt.registerTask('notes', ['bump-only', 'changelog', 'bump-commit']);

  grunt.registerTask('debug', ['support:debug', 'server:debug']);
  grunt.registerTask('release', ['debug', 'server:release']);

  grunt.registerTask('heroku:production', ['release']);

  grunt.registerTask('default', ['debug', 'watch']);
};
<commit_msg>fix: changed so heroku uses debug task<commit_after>'use strict';

var timeGrunt = require('time-grunt'),
    loadTasks = require('load-grunt-tasks');

var jspaths = {
  server: ['app.js', 'globals.js', 'test/**/*.js', 'lib/**/*.js', '!node_modules/**/*.js', '!build/**/*.js', '!dist/**/*.js'],
  support: ['Gruntfile.js']
};

module.exports = function (grunt) {

  // time grunt
  timeGrunt(grunt);

  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    clean: {
      build: ['build']
    },
    jshint: {
      options: {
        jshintrc: true
      },
      server: jspaths.server,
      support: jspaths.support
    },
    watch: {
      server: {
        files: jspaths.server,
        tasks: ['server:debug']
      },
      support: {
        files: jspaths.support,
        tasks: ['support:debug']
      }
    },
    mochaTest: {
      options: {
        reporter: 'spec'
      },
      debug: {
        src: ['test/specs/**/*.js']
      },
      release: {
        src: ['test/integration/*.js']
      }
    },
    bump: {
      options: {
        updateConfigs: ['pkg'],
        commitFiles: ['package.json', 'CHANGELOG.md'],
        pushTo: 'origin'
      }
    },
    changelog: {
      options: {
        repository: '<%= pkg.repository.url %>'
      }
    }
  });

  // load tasks
  loadTasks(grunt);

  grunt.registerTask('support:debug', ['jshint:support']);
  grunt.registerTask('server:debug', ['jshint:server', 'mochaTest:debug']);
  grunt.registerTask('server:release', ['mochaTest:release']);

  grunt.registerTask('notes:minor', ['bump-only:minor', 'changelog', 'bump-commit']);
  grunt.registerTask('notes:major', ['bump-only:major', 'changelog', 'bump-commit']);
  grunt.registerTask('notes', ['bump-only', 'changelog', 'bump-commit']);

  grunt.registerTask('debug', ['support:debug', 'server:debug']);
  grunt.registerTask('release', ['debug', 'server:release']);

  grunt.registerTask('heroku:production', ['debug']);

  grunt.registerTask('default', ['debug', 'watch']);
};
<|endoftext|>


<commit_before>// Generated on 2013-10-21 using generator-webapp 0.4.3
'use strict';

// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'

module.exports = function (grunt) {
  // Show elapsed time at the end
  require('time-grunt')(grunt);
  // load all grunt tasks
  require('load-grunt-tasks')(grunt);

  // Project configuration.
  grunt.initConfig({
    // Metadata
    pkg: grunt.file.readJSON('package.json'),
    banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
      '<%= grunt.template.today("yyyy-mm-dd") %>\n' +
      '<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
      '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
      ' Licensed MIT */\n',

    // Configurable paths
    yeoman: {
      src: 'src',
      test: 'spec',
      dist: 'dist',
      site_src: 'site_src',
      site_dist: 'site_dist'
    },

    watch: {
      options: {
        interrupt: false
      },
      serve: {
        files: [
          '<%= yeoman.src %>/**/*.{coffee,scss}',
          '<%= yeoman.test %>/**/*.coffee'
        ],
        tasks: [
          'coffee:dist',
          'sass:serve'
        ]
      }
    },

    connect: {
      options: {
        port: 9001,
        // change this to '0.0.0.0' to access the server from outside
        hostname: 'localhost'
      },
      serve: {
        options: {
          open: true,
          base: [
            '.tmp',
            '<%= yeoman.src %>',
            '<%= yeoman.site_src %>',
            'bower_components'
          ]
        }
      },
      dist: {
        options: {
          open: true,
          base: [
            '<%= yeoman.dist %>',
            '<%= yeoman.site_src %>',
            'bower_components'
          ]
        }
      }
    },

    coffee: {
      dist: {
        expand: true,
        cwd: '<%= yeoman.src %>/javascripts/',
        src: ['**/*.coffee'],
        dest: '.tmp/javascripts/',
        ext: '.js'
      },
      test: {
        expand: true,
        cwd: 'spec',
        src: ['**/*.coffee'],
        dest: '.tmp/spec/',
        ext: '.js'
      }
    },

    browserify: {
      dist: {
        src: ['.tmp/javascripts/**/*.js'],
        dest: '<%= yeoman.dist %>/<%= pkg.name %>.js'
      },
      serve: {
        src: ['.tmp/javascripts/**/*.js'],
        dest: '.tmp/<%= pkg.name %>.js'
      }
    },

    sass: {
      options: {
        style: 'expanded'
      },
      dist: {
        files: [{
          expand: true,
          cwd: '<%= yeoman.src %>/stylesheets/',
          src: ['**/*.scss', '!**/_*.scss'],
          dest: '<%= yeoman.dist %>/',
          ext: '.css'
        }]
      },
      serve: {
        files: [{
          expand: true,
          cwd: '<%= yeoman.src %>/stylesheets/',
          src: ['**/*.scss', '!**/_*.scss'],
          dest: '.tmp/',
          ext: '.css'
        }]
      }
    },

    // Put files not handled in other tasks here
    copy: {
      test: {
        files: [{
          expand: true,
          dot: true,
          cwd: '<%= yeoman.test %>',
          dest: '.tmp/spec/',
          src: ['**/*.js']
        }]
      },
      dist: {
        files: [{
          expand: true,
          dot: true,
          cwd: '<%= yeoman.src %>',
          dest: '<%= yeoman.dist %>',
          src: ['fonts/**/*']
        }]
      },
      site: {
        files: [
          {
            expand: true,
            dot: true,
            cwd: '<%= yeoman.site_src %>',
            dest: '<%= yeoman.site_dist %>',
            src: ['**/*']
          },
          {
            expand: true,
            dot: true,
            cwd: 'bower_components',
            dest: '<%= yeoman.site_dist %>',
            src: ['**/*']
          },
          {
            expand: true,
            dot: true,
            cwd: '<%= yeoman.dist %>',
            dest: '<%= yeoman.site_dist %>',
            src: ['**/*']
          }
        ]
      }
    },

    uglify: {
      dist: {
        files: [{
          expand: true,
          cwd: '<%= yeoman.dist %>',
          src: ['**/*.js'],
          dest: '<%= yeoman.dist %>',
          ext: '.min.js'
        }]
      }
    },

    cssmin: {
      dist: {
        files: [{
          expand: true,
          cwd: '<%= yeoman.dist %>',
          src: ['**/*.css'],
          dest: '<%= yeoman.dist %>',
          ext: '.min.css'
        }]
      }
    },

    jasmine: {
      specs: [
        'bower_components/jquery/jquery.js',
        'bower_components/underscore/underscore.js',
        'bower_components/ttm-coffeescript-utilities/dist/ttm-coffeescript-utilities.js',
        'bower_components/ttm-coffeescript-math/dist/ttm-coffeescript-math.js',
        '<%= yeoman.dist %>/<%= pkg.name %>.js',
        'bower_components/jasmine-jquery/lib/jasmine-jquery.js',
        '.tmp/spec/support/spec_helpers.js',
        '.tmp/spec/**/*.js'
      ]
    },

    'gh-pages': {
      options: {
        base: '<%= yeoman.site_dist %>'
      },
      src: ['**']
    },

    clean: {
      serve: {
        src: '.tmp'
      },
      dist: {
        src: [
          '.tmp',
          '<%= yeoman.dist %>',
          '<%= yeoman.site_dist %>'
        ]
      }
    }
  });

  // Custom tasks
  grunt.registerTask('serve', function (target) {
    if (target === 'dist') {
      return grunt.task.run(['build', 'connect:dist:keepalive']);
    }

    grunt.task.run([
      'clean:serve',
      'coffee:dist',
      'sass:serve',
      'browserify:serve',
      'connect:serve',
      'watch'
    ]);
  });

  grunt.registerTask('build', [
    'clean:dist',
    'coffee:dist',
    'browserify:dist',
    'uglify',
    'sass:dist',
    'cssmin',
    'copy:dist'
  ]);

  grunt.registerTask('test', [
    'build',
    'coffee:test',
    'copy:test',
    'jasmine'
  ]);

  grunt.registerTask('pages', [
    'build',
    'copy:site',
    'gh-pages'
  ]);

  grunt.registerTask('default', ['build']);
};
<commit_msg>Fix development environment by adding browserify to watch task<commit_after>// Generated on 2013-10-21 using generator-webapp 0.4.3
'use strict';

// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'

module.exports = function (grunt) {
  // Show elapsed time at the end
  require('time-grunt')(grunt);
  // load all grunt tasks
  require('load-grunt-tasks')(grunt);

  // Project configuration.
  grunt.initConfig({
    // Metadata
    pkg: grunt.file.readJSON('package.json'),
    banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
      '<%= grunt.template.today("yyyy-mm-dd") %>\n' +
      '<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
      '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
      ' Licensed MIT */\n',

    // Configurable paths
    yeoman: {
      src: 'src',
      test: 'spec',
      dist: 'dist',
      site_src: 'site_src',
      site_dist: 'site_dist'
    },

    watch: {
      options: {
        interrupt: false
      },
      serve: {
        files: [
          '<%= yeoman.src %>/**/*.{coffee,scss}',
          '<%= yeoman.test %>/**/*.coffee'
        ],
        tasks: [
          'coffee:dist',
          'browserify:serve',
          'sass:serve'
        ]
      }
    },

    connect: {
      options: {
        port: 9001,
        // change this to '0.0.0.0' to access the server from outside
        hostname: 'localhost'
      },
      serve: {
        options: {
          open: true,
          base: [
            '.tmp',
            '<%= yeoman.src %>',
            '<%= yeoman.site_src %>',
            'bower_components'
          ]
        }
      },
      dist: {
        options: {
          open: true,
          base: [
            '<%= yeoman.dist %>',
            '<%= yeoman.site_src %>',
            'bower_components'
          ]
        }
      }
    },

    coffee: {
      dist: {
        expand: true,
        cwd: '<%= yeoman.src %>/javascripts/',
        src: ['**/*.coffee'],
        dest: '.tmp/javascripts/',
        ext: '.js'
      },
      test: {
        expand: true,
        cwd: 'spec',
        src: ['**/*.coffee'],
        dest: '.tmp/spec/',
        ext: '.js'
      }
    },

    browserify: {
      dist: {
        src: ['.tmp/javascripts/**/*.js'],
        dest: '<%= yeoman.dist %>/<%= pkg.name %>.js'
      },
      serve: {
        src: ['.tmp/javascripts/**/*.js'],
        dest: '.tmp/<%= pkg.name %>.js'
      }
    },

    sass: {
      options: {
        style: 'expanded'
      },
      dist: {
        files: [{
          expand: true,
          cwd: '<%= yeoman.src %>/stylesheets/',
          src: ['**/*.scss', '!**/_*.scss'],
          dest: '<%= yeoman.dist %>/',
          ext: '.css'
        }]
      },
      serve: {
        files: [{
          expand: true,
          cwd: '<%= yeoman.src %>/stylesheets/',
          src: ['**/*.scss', '!**/_*.scss'],
          dest: '.tmp/',
          ext: '.css'
        }]
      }
    },

    // Put files not handled in other tasks here
    copy: {
      test: {
        files: [{
          expand: true,
          dot: true,
          cwd: '<%= yeoman.test %>',
          dest: '.tmp/spec/',
          src: ['**/*.js']
        }]
      },
      dist: {
        files: [{
          expand: true,
          dot: true,
          cwd: '<%= yeoman.src %>',
          dest: '<%= yeoman.dist %>',
          src: ['fonts/**/*']
        }]
      },
      site: {
        files: [
          {
            expand: true,
            dot: true,
            cwd: '<%= yeoman.site_src %>',
            dest: '<%= yeoman.site_dist %>',
            src: ['**/*']
          },
          {
            expand: true,
            dot: true,
            cwd: 'bower_components',
            dest: '<%= yeoman.site_dist %>',
            src: ['**/*']
          },
          {
            expand: true,
            dot: true,
            cwd: '<%= yeoman.dist %>',
            dest: '<%= yeoman.site_dist %>',
            src: ['**/*']
          }
        ]
      }
    },

    uglify: {
      dist: {
        files: [{
          expand: true,
          cwd: '<%= yeoman.dist %>',
          src: ['**/*.js'],
          dest: '<%= yeoman.dist %>',
          ext: '.min.js'
        }]
      }
    },

    cssmin: {
      dist: {
        files: [{
          expand: true,
          cwd: '<%= yeoman.dist %>',
          src: ['**/*.css'],
          dest: '<%= yeoman.dist %>',
          ext: '.min.css'
        }]
      }
    },

    jasmine: {
      specs: [
        'bower_components/jquery/jquery.js',
        'bower_components/underscore/underscore.js',
        'bower_components/ttm-coffeescript-utilities/dist/ttm-coffeescript-utilities.js',
        'bower_components/ttm-coffeescript-math/dist/ttm-coffeescript-math.js',
        '<%= yeoman.dist %>/<%= pkg.name %>.js',
        'bower_components/jasmine-jquery/lib/jasmine-jquery.js',
        '.tmp/spec/support/spec_helpers.js',
        '.tmp/spec/**/*.js'
      ]
    },

    'gh-pages': {
      options: {
        base: '<%= yeoman.site_dist %>'
      },
      src: ['**']
    },

    clean: {
      serve: {
        src: '.tmp'
      },
      dist: {
        src: [
          '.tmp',
          '<%= yeoman.dist %>',
          '<%= yeoman.site_dist %>'
        ]
      }
    }
  });

  // Custom tasks
  grunt.registerTask('serve', function (target) {
    if (target === 'dist') {
      return grunt.task.run(['build', 'connect:dist:keepalive']);
    }

    grunt.task.run([
      'clean:serve',
      'coffee:dist',
      'sass:serve',
      'browserify:serve',
      'connect:serve',
      'watch'
    ]);
  });

  grunt.registerTask('build', [
    'clean:dist',
    'coffee:dist',
    'browserify:dist',
    'uglify',
    'sass:dist',
    'cssmin',
    'copy:dist'
  ]);

  grunt.registerTask('test', [
    'build',
    'coffee:test',
    'copy:test',
    'jasmine'
  ]);

  grunt.registerTask('pages', [
    'build',
    'copy:site',
    'gh-pages'
  ]);

  grunt.registerTask('default', ['build']);
};
<|endoftext|>


<commit_before>/* global require, requirejs, define, jasmine */
module.exports = function (grunt) {

	'use strict';

	grunt.initConfig({
		pkg: grunt.file.readJSON('package.json'),

		/*
		 * https://github.com/gruntjs/grunt-contrib-jshint
		 * http://www.jshint.com/docs/
		 * */

		jshint: {

			options: {

				// Enforcing
				camelcase: true,    // allow camelCase and UPPER_CASE only
				curly: true,        // always put curly braces around blocks in loops and conditionals
				immed: true,        // prohibit the use of immediate function invocations without wrapping them in parentheses
				maxdepth: 10,       // maximum level of nested blocks
				maxlen: 160,        // maximum length of a line
				maxparams: 10,      // maximum number of formal parameters allowed per function
				maxstatements: 100, // maximum number of statements allowed per function
				newcap: true,       // require capitalized names of constructor functions
				noarg: true,        // prohibit the use of arguments.caller and arguments.callee
				nonew: true,        // prohibit the use of constructor functions for side-effects
				strict: true,       // require "use strict" statement
				undef: true,        // prohibit the use of explicitly undeclared variables
				validthis: true,    // assume we know how to handle this

				// Relaxing
				boss: true,      // allow the use of assignments in cases where comparisons are expected
				eqnull: true,    // allow == null comparisons
				es5: false,       // allow ECMAScript 5 specific features
				evil: true,      // allow the use of eval
				expr: true,      // allow expressions where normally you would expect to see assignments or function calls
				smarttabs: true, // allow mixed tabs and spaces when the latter are used for alignmnent only
				sub: true,       // allow using [] notation when it can be expressed in dot notation

				// Environment
				browser: true, // define globals exposed by modern browsers
				devel: true,    // define globals that are usually used for logging

				// Global variables, the boolean value determines if the variable is assignable
				globals: {
					self: false,
					define: false,
					require: false,
					requirejs: false,
					exports: false,
					module: false
				}
			},
			client: ['gruntfile.js', 'client/js/**/*.js'],
			node: {
				options: {
					curly: false,
					node: true,
					browser: false,
					strict: false,
					immed: false,
					es5: false
				},
				files: {
					src: ['server/**/*.js']
				}
			}

		},
		jasmine: {
			src: 'client/js/**/*.js',
			options: {
				specs: 'client/specs/**/*spec.js',
				template: require('grunt-template-jasmine-requirejs'),
				templateOptions: {
					requireConfigFile: 'client/js/config.js',
					requireConfig: {
						baseUrl: 'client/js/',
						paths: {
							'client/js': './'
						}
					}
				}
			}
		},
		// squelch jhint warning
		/* jshint camelcase: false */
		jasmine_node: {
			specNameMatcher: '.spec',
			projectRoot: "server",
			forceExit: true,
			jUnit: {
				report: false,
				savePath: "./build/reports/jasmine/",
				useDotNotation: true,
				consolidate: true
			}
		},

		nodemon: {
			dev: {
				options: {
					watchedFolders: [ 'server' ]
				}
			}
		},
		requirejs: {
			compile: {
				options: {
					appDir: "client",
					baseUrl: "js",
					dir: "build/client",
					paths: {
						jquery: 'empty:',
						bootstrap: 'empty:',
						underscore: 'empty:',
						angular: 'empty:',
						angularcookie: 'empty:',
						json: '../lib/require/json',
						text: '../lib/require/text',
						data: '../data'
					},
					shim: {
						angular: {
							deps: ['jquery'], // for angular.element
							exports: 'angular'
						},
						angularcookie: {
							deps: ['angular']
						},
						'bootstrap': {
							deps: ['jquery']
						},
						'underscore': {
							exports: '_'
						}

					},
					// skip libraries except text & json
					fileExclusionRegExp: /^(specs|index.jasmine.html|jquery|bootstrap|underscore|angular|jasmine|index.html|prod-index.html)/,
					optimizeCss: 'standard',

					removeCombined: true,
					modules: [
						{
							name: "main"
						}
					]
				}

			}
		},
		copy: {
			postBuild: {
				files: [
					{expand: true, src: ['client/lib/**'], dest: 'build/'},
					{ expand: true, src: ['client/prod-index.html'], dest: 'build/client', filter: 'isFile',
						rename: function (dest, src) {
							// use the source directory to create the file
							// example with your directory structure
							//   dest = 'dev/js/'
							//   src = 'module1/js/main.js'
							return dest + '/index.html';
						}},

				]
			}
		}
	});

	//Deps tasks
	grunt.loadNpmTasks('grunt-contrib-jshint');
	grunt.loadNpmTasks('grunt-contrib-jasmine');
	grunt.loadNpmTasks('grunt-jasmine-node');
	grunt.loadNpmTasks('grunt-nodemon');
	grunt.loadNpmTasks('grunt-contrib-requirejs');
	grunt.loadNpmTasks('grunt-contrib-copy');

	//lint tasks
	grunt.registerTask('lint', ['jshint:client', 'jshint:node']);
	grunt.registerTask('lint_browser', ['jshint:client']);
	grunt.registerTask('lint_node', ['jshint:node']);

	//spec tastks
	grunt.registerTask('spec', ['jasmine', 'jasmine_node']);
	grunt.registerTask('spec_browser', ['jasmine']);
	grunt.registerTask('spec_node', ['jasmine_node']);
	grunt.registerTask('build', ['requirejs', 'copy:postBuild']);

	// default tasks
	grunt.registerTask('all', ['jshint:client', 'jshint:node', 'jasmine', 'jasmine_node']);

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

};<commit_msg>added some comments<commit_after>/* global require, requirejs, define, jasmine */
module.exports = function (grunt) {

	'use strict';

	grunt.initConfig({
		pkg: grunt.file.readJSON('package.json'),

		/*
		 * https://github.com/gruntjs/grunt-contrib-jshint
		 * http://www.jshint.com/docs/
		 * */

		jshint: {

			options: {

				// Enforcing
				camelcase: true,    // allow camelCase and UPPER_CASE only
				curly: true,        // always put curly braces around blocks in loops and conditionals
				immed: true,        // prohibit the use of immediate function invocations without wrapping them in parentheses
				maxdepth: 10,       // maximum level of nested blocks
				maxlen: 160,        // maximum length of a line
				maxparams: 10,      // maximum number of formal parameters allowed per function
				maxstatements: 100, // maximum number of statements allowed per function
				newcap: true,       // require capitalized names of constructor functions
				noarg: true,        // prohibit the use of arguments.caller and arguments.callee
				nonew: true,        // prohibit the use of constructor functions for side-effects
				strict: true,       // require "use strict" statement
				undef: true,        // prohibit the use of explicitly undeclared variables
				validthis: true,    // assume we know how to handle this

				// Relaxing
				boss: true,      // allow the use of assignments in cases where comparisons are expected
				eqnull: true,    // allow == null comparisons
				es5: false,       // allow ECMAScript 5 specific features
				evil: true,      // allow the use of eval
				expr: true,      // allow expressions where normally you would expect to see assignments or function calls
				smarttabs: true, // allow mixed tabs and spaces when the latter are used for alignmnent only
				sub: true,       // allow using [] notation when it can be expressed in dot notation

				// Environment
				browser: true, // define globals exposed by modern browsers
				devel: true,    // define globals that are usually used for logging

				// Global variables, the boolean value determines if the variable is assignable
				globals: {
					self: false,
					define: false,
					require: false,
					requirejs: false,
					exports: false,
					module: false
				}
			},
			client: ['gruntfile.js', 'client/js/**/*.js'],
			node: {
				options: {
					curly: false,
					node: true,
					browser: false,
					strict: false,
					immed: false,
					es5: false
				},
				files: {
					src: ['server/**/*.js']
				}
			}

		},
		jasmine: {
			src: 'client/js/**/*.js',
			options: {
				specs: 'client/specs/**/*spec.js',
				template: require('grunt-template-jasmine-requirejs'),
				templateOptions: {
					requireConfigFile: 'client/js/config.js',
					requireConfig: {
						baseUrl: 'client/js/',
						paths: {
							'client/js': './'
						}
					}
				}
			}
		},
		// squelch jhint warning
		/* jshint camelcase: false */
		jasmine_node: {
			specNameMatcher: '.spec',
			projectRoot: "server",
			forceExit: true,
			jUnit: {
				report: false,
				savePath: "./build/reports/jasmine/",
				useDotNotation: true,
				consolidate: true
			}
		},

		nodemon: {
			dev: {
				options: {
					watchedFolders: [ 'server' ]
				}
			}
		},
		requirejs: {
			compile: {
				options: {
					appDir: "client",
					baseUrl: "js",
					dir: "build/client",
					paths: {
						jquery: 'empty:',
						bootstrap: 'empty:',
						underscore: 'empty:',
						angular: 'empty:',
						angularcookie: 'empty:',
						json: '../lib/require/json',
						text: '../lib/require/text',
						data: '../data'
					},
					shim: {
						angular: {
							deps: ['jquery'], // for angular.element
							exports: 'angular'
						},
						angularcookie: {
							deps: ['angular']
						},
						'bootstrap': {
							deps: ['jquery']
						},
						'underscore': {
							exports: '_'
						}

					},
					// skip libraries except text & json
					fileExclusionRegExp: /^(specs|index.jasmine.html|jquery|bootstrap|underscore|angular|jasmine|index.html|prod-index.html)/,
					optimizeCss: 'standard',

					removeCombined: true,
					modules: [
						{
							name: "main"
						}
					]
				}

			}
		},
		copy: {
			postBuild: {
				files: [
					//copy all third party libraries to build
					{expand: true, src: ['client/lib/**'], dest: 'build/'},

					//copy prod-index.html to index.html for build
					{ expand: true, src: ['client/prod-index.html'], dest: 'build/client', filter: 'isFile',
						rename: function (dest, src) {
							return dest + '/index.html';
						}},

				]
			}
		}
	});

	//Deps tasks
	grunt.loadNpmTasks('grunt-contrib-jshint');
	grunt.loadNpmTasks('grunt-contrib-jasmine');
	grunt.loadNpmTasks('grunt-jasmine-node');
	grunt.loadNpmTasks('grunt-nodemon');
	grunt.loadNpmTasks('grunt-contrib-requirejs');
	grunt.loadNpmTasks('grunt-contrib-copy');

	//lint tasks
	grunt.registerTask('lint', ['jshint:client', 'jshint:node']);
	grunt.registerTask('lint_browser', ['jshint:client']);
	grunt.registerTask('lint_node', ['jshint:node']);

	//spec tastks
	grunt.registerTask('spec', ['jasmine', 'jasmine_node']);
	grunt.registerTask('spec_browser', ['jasmine']);
	grunt.registerTask('spec_node', ['jasmine_node']);
	grunt.registerTask('build', ['requirejs', 'copy:postBuild']);

	// default tasks
	grunt.registerTask('all', ['jshint:client', 'jshint:node', 'jasmine', 'jasmine_node']);

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

};<|endoftext|>


<commit_before>/*
 * grunt-maven-tasks
 * https://github.com/smh/grunt-maven-tasks
 *
 * Copyright (c) 2013 Stein Martin Hustad
 * Licensed under the MIT license.
 */

'use strict';

module.exports = function(grunt) {

  // Project configuration.
  grunt.initConfig({
    jshint: {
      all: [
        'Gruntfile.js',
        'tasks/**/*.js',
        'test/**/*.js',
      ],
      options: {
        jshintrc: '.jshintrc',
      },
    },

    // Unit tests.
    simplemocha: {
      options: {
        timeout: 5000,
        ui: 'bdd',
        reporter: 'tap'
      },
      all: ['test/**/*.js'],
    },
  });

  // These plugins provide necessary tasks.
  grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-simple-mocha');

  // Whenever the "test" task is run, first clean the "tmp" dir, then run this
  // plugin's task(s), then test the result.
  grunt.registerTask('test', ['simplemocha']);

  // By default, lint and run all tests.
  grunt.registerTask('default', ['jshint', 'test']);
};
<commit_msg>Remove unnecessary trailing commas from Gruntfile<commit_after>/*
 * grunt-maven-tasks
 * https://github.com/smh/grunt-maven-tasks
 *
 * Copyright (c) 2013 Stein Martin Hustad
 * Licensed under the MIT license.
 */

'use strict';

module.exports = function(grunt) {

  // Project configuration.
  grunt.initConfig({
    jshint: {
      all: [
        'Gruntfile.js',
        'tasks/**/*.js',
        'test/**/*.js'
      ],
      options: {
        jshintrc: '.jshintrc'
      }
    },

    // Unit tests.
    simplemocha: {
      options: {
        timeout: 5000,
        ui: 'bdd',
        reporter: 'tap'
      },
      all: ['test/**/*.js']
    }
  });

  // These plugins provide necessary tasks.
  grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-simple-mocha');

  // Whenever the "test" task is run, first clean the "tmp" dir, then run this
  // plugin's task(s), then test the result.
  grunt.registerTask('test', ['simplemocha']);

  // By default, lint and run all tests.
  grunt.registerTask('default', ['jshint', 'test']);
};
<|endoftext|>


<commit_before>/*jshint node:true*/

'use strict';

module.exports = function(grunt) {

  /**
   * [config description]
   * @type {Object}
   */
  var config = {
    app: 'app',
    dist: 'dist',
    root: '/'
  };

  require('time-grunt')(grunt);
  require('load-grunt-tasks')(grunt);

  /**
   * Configuring grunt tasks
   */
  grunt.initConfig({

    // Project settings
    config: config,

    // Empties folders to start fresh
    clean: {
      dist: {
        files: [{
          dot: true,
          src: [
            '.tmp',
            '<%= config.dist %>/*'
          ]
        }]
      },
      server: '.tmp'
    },

    // Copies remaining files to places other tasks can use
    copy: {
      dist: {
        files: [{
          expand: true,
          dot: true,
          cwd: '<%= config.app %>',
          dest: '<%= config.dist %>',
          src: [
            '*.{ico,png,txt}',
            '{,*/}*.html',
            'assets/video/{,*/}*.*',
            'assets/arrow-down.svg',
            'assets/what.svg',
            'assets/features/icon-developers.svg'
          ]
        }]
      }
    },

    // The actual grunt server settings
    connect: {
      options: {
        port: 5000,
        hostname: 'localhost'
      },
      server: {
        options: {
          middleware: function(connect) {
            return [
              connect.static('.tmp'),
              connect().use(
                '/bower_components',
                connect.static('./bower_components')
              ),
              connect.static(config.app)
            ];
          }
        }
      }
    },

    // Compiles Sass to CSS and generates necessary files if requested
    sass: {
      compile: {
        options: {
          bundleExec: true,
          style: 'expanded',
          loadPath: ['./bower_components/foundation/scss'],
          sourcemap: 'none'
        },
        files: {
          '.tmp/styles/main.css': '<%= config.app %>/styles/main.scss'
        }
      }
    },

    cssmin: {
      compile: {
        files: {
          '<%= config.dist %>/styles/main.css': [
            '.tmp/styles/main.css'
          ]
        }
      }
    },

    // Make sure code styles are up to par and there are no obvious mistakes
    jshint: {
      options: {
        reporter: require('jshint-stylish'),
        jshintrc: './.jshintrc'
      },
      all: [
        'Gruntfile.js',
        '<%= config.app %>/scripts/{,*/}*.js'
      ]
    },

    // Reads HTML for usemin blocks to enable smart builds that automatically
    // concat, minify and revision files. Creates configurations in memory so
    // additional tasks can operate on them
    useminPrepare: {
      options: {
        dest: '<%= config.dist %>'
      },
      html: '<%= config.app %>/index.html'
    },

    concat: {
      generated: {
        files: [
          {
            dest: '<%= config.dist %>/scripts/main.js',
            src: [
              'bower_components/jquery/dist/jquery.js',
              'bower_components/underscore/underscore.js',
              'bower_components/backbone/backbone.js',
              'bower_components/foundation/js/foundation.js',
              'bower_components/slick.js/slick/slick.js',
              '<%= config.app %>/scripts/{,*/}*.js',
            ]
          }
        ]
      }
    },

    // Performs rewrites based on rev and the useminPrepare configuration
    usemin: {
      options: {
        assetsDirs: [
          '<%= config.dist %>',
          '<%= config.dist %>/assets/{,*/}',
          '<%= config.dist %>/assets/video',
          '<%= config.dist %>/styles',
          '<%= config.dist %>/styles/'
        ]
      },
      html: ['<%= config.dist %>/{,*/}*.html'],
      css: ['<%= config.dist %>/styles/{,*/}*.css']
    },

    // The following *-min tasks produce minified files in the dist folder
    imagemin: {
      dist: {
        files: [{
          expand: true,
          cwd: '<%= config.app %>/assets',
          src: '{,*/}*.{gif,jpeg,jpg,png}',
          dest: '<%= config.dist %>/assets'
        }]
      }
    },

    svgmin: {
      dist: {
        files: [{
          expand: true,
          cwd: '<%= config.app %>/assets',
          src: '{,*/}*.svg',
          dest: '<%= config.dist %>/assets'
        }]
      }
    },

    htmlmin: {
      dist: {
        options: {
          collapseBooleanAttributes: true,
          collapseWhitespace: true,
          conservativeCollapse: true,
          removeAttributeQuotes: true,
          removeCommentsFromCDATA: true,
          removeEmptyAttributes: true,
          removeOptionalTags: true,
          // true would impact styles with attribute selectors
          removeRedundantAttributes: false,
          useShortDoctype: true
        },
        files: [{
          expand: true,
          cwd: '<%= config.dist %>',
          src: '{,*/}*.html',
          dest: '<%= config.dist %>'
        }]
      }
    },

    // Watches files for changes and runs tasks based on the changed files
    watch: {
      scripts: {
        files: '<%= jshint.all %>',
        tasks: ['jshint']
      },
      styles: {
        files: '<%= config.app %>/styles/{,*/}*.scss',
        tasks: ['sass']
      }
    },

    // gh-pages for deploy
    'gh-pages': {
      options: {
        base: '<%= config.dist %>'
      },
      src: ['**']
    }

  });

  /**
   * Use this task for run javascript test and code quality
   * command: grunt
   */
  grunt.registerTask('test', [
    'jshint'
  ]);

  /**
   * Use this task for development
   * command: grunt
   */
  grunt.registerTask('default', [
    'test',
    'sass'
  ]);

  /**
   * Create local server, useful to develop
   */
  grunt.registerTask('serve', [
    //'default',
    'connect:server',
    'watch'
  ]);

  /**
   * Build and create dist folder, useful for test before deploy
   * command: grunt build
   */
  grunt.registerTask('build', [
    'clean:dist',
    'useminPrepare',
    'sass',
    'imagemin',
    'svgmin',
    'copy:dist',
    'cssmin:compile',
    'concat:generated',
    'usemin',
    'htmlmin'
  ]);

  /**
   * Deploy with gh-pages
   * command: grunt deploy
   */
  grunt.registerTask('deploy', ['build', 'gh-pages']);

};
<commit_msg>remove root config var<commit_after>/*jshint node:true*/

'use strict';

module.exports = function(grunt) {

  /**
   * [config description]
   * @type {Object}
   */
  var config = {
    app: 'app',
    dist: 'dist'
  };

  require('time-grunt')(grunt);
  require('load-grunt-tasks')(grunt);

  /**
   * Configuring grunt tasks
   */
  grunt.initConfig({

    // Project settings
    config: config,

    // Empties folders to start fresh
    clean: {
      dist: {
        files: [{
          dot: true,
          src: [
            '.tmp',
            '<%= config.dist %>/*'
          ]
        }]
      },
      server: '.tmp'
    },

    // Copies remaining files to places other tasks can use
    copy: {
      dist: {
        files: [{
          expand: true,
          dot: true,
          cwd: '<%= config.app %>',
          dest: '<%= config.dist %>',
          src: [
            '*.{ico,png,txt}',
            '{,*/}*.html',
            'assets/video/{,*/}*.*',
            'assets/arrow-down.svg',
            'assets/what.svg',
            'assets/features/icon-developers.svg'
          ]
        }]
      }
    },

    // The actual grunt server settings
    connect: {
      options: {
        port: 5000,
        hostname: 'localhost'
      },
      server: {
        options: {
          middleware: function(connect) {
            return [
              connect.static('.tmp'),
              connect().use(
                '/bower_components',
                connect.static('./bower_components')
              ),
              connect.static(config.app)
            ];
          }
        }
      }
    },

    // Compiles Sass to CSS and generates necessary files if requested
    sass: {
      compile: {
        options: {
          bundleExec: true,
          style: 'expanded',
          loadPath: ['./bower_components/foundation/scss'],
          sourcemap: 'none'
        },
        files: {
          '.tmp/styles/main.css': '<%= config.app %>/styles/main.scss'
        }
      }
    },

    cssmin: {
      compile: {
        files: {
          '<%= config.dist %>/styles/main.css': [
            '.tmp/styles/main.css'
          ]
        }
      }
    },

    // Make sure code styles are up to par and there are no obvious mistakes
    jshint: {
      options: {
        reporter: require('jshint-stylish'),
        jshintrc: './.jshintrc'
      },
      all: [
        'Gruntfile.js',
        '<%= config.app %>/scripts/{,*/}*.js'
      ]
    },

    // Reads HTML for usemin blocks to enable smart builds that automatically
    // concat, minify and revision files. Creates configurations in memory so
    // additional tasks can operate on them
    useminPrepare: {
      options: {
        dest: '<%= config.dist %>'
      },
      html: '<%= config.app %>/index.html'
    },

    concat: {
      generated: {
        files: [
          {
            dest: '<%= config.dist %>/scripts/main.js',
            src: [
              'bower_components/jquery/dist/jquery.js',
              'bower_components/underscore/underscore.js',
              'bower_components/backbone/backbone.js',
              'bower_components/foundation/js/foundation.js',
              'bower_components/slick.js/slick/slick.js',
              '<%= config.app %>/scripts/{,*/}*.js',
            ]
          }
        ]
      }
    },

    // Performs rewrites based on rev and the useminPrepare configuration
    usemin: {
      options: {
        assetsDirs: [
          '<%= config.dist %>',
          '<%= config.dist %>/assets/{,*/}',
          '<%= config.dist %>/assets/video',
          '<%= config.dist %>/styles',
          '<%= config.dist %>/styles/'
        ]
      },
      html: ['<%= config.dist %>/{,*/}*.html'],
      css: ['<%= config.dist %>/styles/{,*/}*.css']
    },

    // The following *-min tasks produce minified files in the dist folder
    imagemin: {
      dist: {
        files: [{
          expand: true,
          cwd: '<%= config.app %>/assets',
          src: '{,*/}*.{gif,jpeg,jpg,png}',
          dest: '<%= config.dist %>/assets'
        }]
      }
    },

    svgmin: {
      dist: {
        files: [{
          expand: true,
          cwd: '<%= config.app %>/assets',
          src: '{,*/}*.svg',
          dest: '<%= config.dist %>/assets'
        }]
      }
    },

    htmlmin: {
      dist: {
        options: {
          collapseBooleanAttributes: true,
          collapseWhitespace: true,
          conservativeCollapse: true,
          removeAttributeQuotes: true,
          removeCommentsFromCDATA: true,
          removeEmptyAttributes: true,
          removeOptionalTags: true,
          // true would impact styles with attribute selectors
          removeRedundantAttributes: false,
          useShortDoctype: true
        },
        files: [{
          expand: true,
          cwd: '<%= config.dist %>',
          src: '{,*/}*.html',
          dest: '<%= config.dist %>'
        }]
      }
    },

    // Watches files for changes and runs tasks based on the changed files
    watch: {
      scripts: {
        files: '<%= jshint.all %>',
        tasks: ['jshint']
      },
      styles: {
        files: '<%= config.app %>/styles/{,*/}*.scss',
        tasks: ['sass']
      }
    },

    // gh-pages for deploy
    'gh-pages': {
      options: {
        base: '<%= config.dist %>'
      },
      src: ['**']
    }

  });

  /**
   * Use this task for run javascript test and code quality
   * command: grunt
   */
  grunt.registerTask('test', [
    'jshint'
  ]);

  /**
   * Use this task for development
   * command: grunt
   */
  grunt.registerTask('default', [
    'test',
    'sass'
  ]);

  /**
   * Create local server, useful to develop
   */
  grunt.registerTask('serve', [
    //'default',
    'connect:server',
    'watch'
  ]);

  /**
   * Build and create dist folder, useful for test before deploy
   * command: grunt build
   */
  grunt.registerTask('build', [
    'clean:dist',
    'useminPrepare',
    'sass',
    'imagemin',
    'svgmin',
    'copy:dist',
    'cssmin:compile',
    'concat:generated',
    'usemin',
    'htmlmin'
  ]);

  /**
   * Deploy with gh-pages
   * command: grunt deploy
   */
  grunt.registerTask('deploy', ['build', 'gh-pages']);

};
<|endoftext|>


<commit_before>// My Site Template
// ===

module.exports = function (grunt) {

  require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);

  grunt.initConfig({

    pkg: grunt.file.readJSON('package.json'),

    watch: {
      css: {
        files: ['<%= pkg.name %>/static/style/**/*.scss', '<%= pkg.name %>/static/bower/**/*.scss'],
        tasks: ['sass:colbystyle']
      },
      script: {
        files: ['<%= pkg.name %>/static/script/site.js'],
        tasks: ['buildjs']
      }
    },

    // SCSS Compile
    sass: {
      colbystyle: {
        files: {
          '<%= pkg.name %>/static/style/site.css': '<%= pkg.name %>/static/style/site.scss'
        },
        options: {
          banner: '/* Stylesheet for <%= pkg.name %> */',
          style: 'compressed',
          quiet: true
        }
      }

    },

    // Hint JS
    jshint: {
      all: ['<%= pkg.name %>/static/script/site.js']
    },

    // Concat JS
    concat: {
      dist: {
        options: {
          stripBanners: false,
          banner: '/*! DEVELOPMENT VERSION */ \n'
        },
        src: [
          '<%= pkg.name %>/static/bower/jquery/dist/jquery.js',
          '<%= pkg.name %>/static/script/site.min.js'
        ],
        dest: '<%= pkg.name %>/static/script/site-compiled.js'
      }
    },

    // Uglify JS
    uglify: {
      options: {
        banner: '/*! Compiled Site Javascript v<%= pkg.version %> on ' +
            '<%= grunt.template.today("yyyy-mm-dd") %> */ \n'
      },
      dist: {
        files: {
          '<%= pkg.name %>/static/script/site.min.js': ['<%= pkg.name %>/static/script/site.js'],
          '<%= pkg.name %>/static/script/libs/modernizr.min.js': ['<%= pkg.name %>/static/bower/modernizr/modernizr.js'],
          '<%= pkg.name %>/static/script/libs/html5shiv.min.js': ['<%= pkg.name %>/static/bower/html5shiv/dist/html5shiv.js']
        }
      }
    },

    // Live Reloading/Sync
    browserSync: {

      dev: {
        files: {
          src: [
            '<%= pkg.name %>/static/style/*.css',
            '<%= pkg.name %>/templates/**/*.html'
          ]
        },
        options: {
          debugInfo: true,
          watchTask: true,
          proxy: {
            host: 'localhost',
            port: 8000
          }
        }
      }

    }

  });

  // Tasks
  grunt.registerTask('default', ['browserSync', 'watch']);
  grunt.registerTask('buildcss', ['sass']);
  grunt.registerTask('buildjs', ['jshint', 'uglify', 'concat']);
  grunt.registerTask('guide', ['sass', 'styleguide']);

};<commit_msg>Gruntfile updates<commit_after>// My Site Template
// ===

module.exports = function (grunt) {

  require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);

  grunt.initConfig({

    pkg: grunt.file.readJSON('package.json'),

    watch: {
      css: {
        files: ['<%= pkg.name %>/static/style/**/*.scss', '<%= pkg.name %>/static/bower/**/*.scss'],
        tasks: ['sass:colbystyle']
      },
      script: {
        files: ['<%= pkg.name %>/static/script/site.js'],
        tasks: ['buildjs']
      }
    },

    // SCSS Compile
    sass: {
      colbystyle: {
        files: {
          '<%= pkg.name %>/static/style/site.css': '<%= pkg.name %>/static/style/site.scss'
        },
        options: {
          style: 'compressed',
          quiet: true
        }
      }

    },

    // Hint JS
    jshint: {
      all: ['<%= pkg.name %>/static/script/site.js']
    },

    // Concat JS
    concat: {
      dist: {
        options: {
          stripBanners: false,
          banner: '/*! DEVELOPMENT VERSION */ \n'
        },
        src: [
          '<%= pkg.name %>/static/bower/jquery/dist/jquery.js',
          '<%= pkg.name %>/static/script/site.min.js'
        ],
        dest: '<%= pkg.name %>/static/script/site-compiled.js'
      }
    },

    // Uglify JS
    uglify: {
      options: {
        banner: '/*! Compiled Site Javascript v<%= pkg.version %> on ' +
            '<%= grunt.template.today("yyyy-mm-dd") %> */ \n'
      },
      dist: {
        files: {
          '<%= pkg.name %>/static/script/site.min.js': ['<%= pkg.name %>/static/script/site.js'],
          '<%= pkg.name %>/static/script/libs/modernizr.min.js': ['<%= pkg.name %>/static/bower/modernizr/modernizr.js'],
          '<%= pkg.name %>/static/script/libs/html5shiv.min.js': ['<%= pkg.name %>/static/bower/html5shiv/dist/html5shiv.js']
        }
      }
    },

    // Live Reloading/Sync
    browserSync: {

      dev: {
        files: {
          src: [
            '<%= pkg.name %>/static/style/*.css',
            '<%= pkg.name %>/templates/**/*.html'
          ]
        },
        options: {
          debugInfo: true,
          watchTask: true,
          proxy: "127.0.0.1:8000"
        }
      }

    }

  });

  // Tasks
  grunt.registerTask('default', ['browserSync', 'watch']);
  grunt.registerTask('buildcss', ['sass']);
  grunt.registerTask('buildjs', ['jshint', 'uglify', 'concat']);
  grunt.registerTask('guide', ['sass', 'styleguide']);

};
<|endoftext|>


<commit_before>'use strict';

module.exports = function(grunt) {
  // commenting this out for now until used
  //var dist = '' + (process.env.SERVER_BASE || 'dist_dev');
  var config = {
    pkg: grunt.file.readJSON('package.json'),
    files: {
      html: {
        src: 'src/index.html'
      },
      js: {
        src: [
          'src/modules/*/*.js',
          'src/app.js'
        ]
      },
      templates: {
        src: 'src/**/*.html'
      },
      less: {
        src: [
          'src/css/style.less'
        ]
      }
    },
    bower: {
      install: {
        options: {
          targetDir: './src/lib/vendor'
        }
      }
    },
    jshint: {
      options: {
        jshintrc: '.jshintrc',
        reporter: require('jshint-stylish')
      },
      all: ['Gruntfile.js', '<%= files.js.src %>']
    },
    less: {
      options: {
        paths: ['src/css'],
        ieCompat: false
      },
      dev: {
        src: '<%= files.less.src %>',
        dest: 'src/css/style.css'
      },
      dist: {
        options: {
          cleancss: true,
          compress: true
        },
        src: '<%= files.less.src %>',
        dest: 'src/css/style.css'
      }
    },
    watch: {
      options: {
        livereload: false
      },
      less: {
        files: ['<%= files.less.src %>'],
        tasks: ['less:dev']
      }
    },
    copy: {
      main: {
        files: [
          {
            expand: true,
            src: ['src/**'],
            dest: 'generated/'
          },
          {src: ['package.json'], dest: 'generated/package.json'}
        ]
      }
    },
    clean: {
      workspaces: ['dist', 'generated', 'src/downloads']
    },
    nodewebkit: {
      options: {
        // Versions listed here: http://dl.node-webkit.org/
        version: 'v0.10.1',
        platforms: ['win','osx', 'linux32', 'linux64'],
        buildDir: 'dist'
      },
      src: ['generated/**/**']
    }
  };

  // initialize task config
  grunt.initConfig(config);

  // load local tasks
  grunt.loadTasks('tasks');

  // loads all grunt-* tasks based on package.json definitions
  require('matchdep').filterAll('grunt-*').forEach(grunt.loadNpmTasks);

  // create workflows
  grunt.registerTask('default', ['bower', 'jshint', 'less:dev', 'watch']);
  grunt.registerTask('test', ['jshint']);
  grunt.registerTask('build', ['clean', 'bower', 'jshint', 'less:dist', 'copy', 'nodewebkit']);
};<commit_msg>#27: Comment out local tasks loader until we actually have local tasks<commit_after>'use strict';

module.exports = function(grunt) {
  // commenting this out for now until used
  //var dist = '' + (process.env.SERVER_BASE || 'dist_dev');
  var config = {
    pkg: grunt.file.readJSON('package.json'),
    files: {
      html: {
        src: 'src/index.html'
      },
      js: {
        src: [
          'src/modules/*/*.js',
          'src/app.js'
        ]
      },
      templates: {
        src: 'src/**/*.html'
      },
      less: {
        src: [
          'src/css/style.less'
        ]
      }
    },
    bower: {
      install: {
        options: {
          targetDir: './src/lib/vendor'
        }
      }
    },
    jshint: {
      options: {
        jshintrc: '.jshintrc',
        reporter: require('jshint-stylish')
      },
      all: ['Gruntfile.js', '<%= files.js.src %>']
    },
    less: {
      options: {
        paths: ['src/css'],
        ieCompat: false
      },
      dev: {
        src: '<%= files.less.src %>',
        dest: 'src/css/style.css'
      },
      dist: {
        options: {
          cleancss: true,
          compress: true
        },
        src: '<%= files.less.src %>',
        dest: 'src/css/style.css'
      }
    },
    watch: {
      options: {
        livereload: false
      },
      less: {
        files: ['<%= files.less.src %>'],
        tasks: ['less:dev']
      }
    },
    copy: {
      main: {
        files: [
          {
            expand: true,
            src: ['src/**'],
            dest: 'generated/'
          },
          {src: ['package.json'], dest: 'generated/package.json'}
        ]
      }
    },
    clean: {
      workspaces: ['dist', 'generated', 'src/downloads']
    },
    nodewebkit: {
      options: {
        // Versions listed here: http://dl.node-webkit.org/
        version: 'v0.10.1',
        platforms: ['win','osx', 'linux32', 'linux64'],
        buildDir: 'dist'
      },
      src: ['generated/**/**']
    }
  };

  // initialize task config
  grunt.initConfig(config);

  // load local tasks
  // Comment this out until we actually have local tasks
  // grunt.loadTasks('tasks');

  // loads all grunt-* tasks based on package.json definitions
  require('matchdep').filterAll('grunt-*').forEach(grunt.loadNpmTasks);

  // create workflows
  grunt.registerTask('default', ['bower', 'jshint', 'less:dev', 'watch']);
  grunt.registerTask('test', ['jshint']);
  grunt.registerTask('build', ['clean', 'bower', 'jshint', 'less:dist', 'copy', 'nodewebkit']);
};<|endoftext|>


<commit_before>'use strict';

module.exports = function (grunt) {

    grunt.config.init({
        jshint: {
            options: {
                jshintrc: true
            },
            all: {
                src: ['Gruntfile.js', 'tasks/**/*.js']
            }
        },
        bump: {
            options: {
                files: ['package.json'],
                createTag: false
            }
        }
    });

    grunt.loadNpmTasks('grunt-contrib-jshint');
    grunt.loadNpmTasks('grunt-bump');

    // default task
    grunt.registerTask('default', ['jshint:all']);
};
<commit_msg>don't push during grunt-bump<commit_after>'use strict';

module.exports = function (grunt) {

    grunt.config.init({
        jshint: {
            options: {
                jshintrc: true
            },
            all: {
                src: ['Gruntfile.js', 'tasks/**/*.js']
            }
        },
        bump: {
            options: {
                files: ['package.json'],
                createTag: false,
                push: false
            }
        }
    });

    grunt.loadNpmTasks('grunt-contrib-jshint');
    grunt.loadNpmTasks('grunt-bump');

    // default task
    grunt.registerTask('default', ['jshint:all']);
};
<|endoftext|>


<commit_before>'use strict';

var paths = {
    js: ['*.js', 'test/**/*.js', '!test/coverage/**', '!bower_components/**', 'packages/**/*.js', '!packages/**/node_modules/**'],
    html: ['packages/**/public/**/views/**', 'packages/**/server/views/**'],
    css: ['!bower_components/**', 'packages/**/public/**/css/*.css']
};

module.exports = function(grunt) {

    if (process.env.NODE_ENV !== 'production') {
        require('time-grunt')(grunt);
    }

    // Project Configuration
    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),
        assets: grunt.file.readJSON('config/assets.json'),
        clean: ['bower_components/build'],
        watch: {
            js: {
                files: paths.js,
                tasks: ['jshint'],
                options: {
                    livereload: true
                }
            },
            html: {
                files: paths.html,
                options: {
                    livereload: true,
                    interval: 500
                }
            },
            css: {
                files: paths.css,
                tasks: ['csslint'],
                options: {
                    livereload: true
                }
            }
        },
        jshint: {
            all: {
                src: paths.js,
                options: {
                    jshintrc: true
                }
            }
        },
        uglify: {
            core: {
                options: {
                    mangle: false
                },
                files: '<%= assets.core.js %>'
            }
        },
        csslint: {
            options: {
                csslintrc: '.csslintrc'
            },
            src: paths.css
        },
        cssmin: {
            core: {
                files: '<%= assets.core.css %>'
            }
        },
        nodemon: {
            dev: {
                script: 'server.js',
                options: {
                    args: [],
                    ignore: ['node_modules/**'],
                    ext: 'js,html',
                    nodeArgs: ['--debug'],
                    delayTime: 1,
                    cwd: __dirname
                }
            }
        },
        concurrent: {
            tasks: ['nodemon', 'watch'],
            options: {
                logConcurrentOutput: true
            }
        },
        mochaTest: {
            options: {
                reporter: 'spec',
                require: [
                    'server.js',
                    function() {
                        require('meanio/lib/util').preload(__dirname + '/packages/**/server', 'model');
                    }
                ]
            },
            src: ['packages/**/server/tests/**/*.js']
        },
        env: {
            test: {
                NODE_ENV: 'test'
            }
        },
        karma: {
            unit: {
                configFile: 'karma.conf.js'
            }
        }
    });

    //Load NPM tasks
    require('load-grunt-tasks')(grunt);

    //Default task(s).
    if (process.env.NODE_ENV === 'production') {
        grunt.registerTask('default', ['clean', 'cssmin', 'uglify', 'concurrent']);
    } else {
        grunt.registerTask('default', ['clean', 'jshint', 'csslint', 'concurrent']);
    }

    //Test task.
    //grunt.registerTask('test', ['env:test', 'mochaTest', 'karma:unit']);
    grunt.registerTask('test', ['env:test', 'mochaTest']);

    // For Heroku users only.
    // Docs: https://github.com/linnovate/mean/wiki/Deploying-on-Heroku
    grunt.registerTask('heroku:production', ['cssmin', 'uglify']);
};
<commit_msg>adjust port and log<commit_after>'use strict';

var paths = {
    js: ['*.js', 'test/**/*.js', '!test/coverage/**', '!bower_components/**', 'packages/**/*.js', '!packages/**/node_modules/**'],
    html: ['packages/**/public/**/views/**', 'packages/**/server/views/**'],
    css: ['!bower_components/**', 'packages/**/public/**/css/*.css']
};

module.exports = function(grunt) {

    console.log("ENV: " + process.env.NODE_ENV);

    if (process.env.NODE_ENV !== 'production') {
        require('time-grunt')(grunt);
    }

    // Project Configuration
    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),
        assets: grunt.file.readJSON('config/assets.json'),
        clean: ['bower_components/build'],
        watch: {
            js: {
                files: paths.js,
                tasks: ['jshint'],
                options: {
                    livereload: true
                }
            },
            html: {
                files: paths.html,
                options: {
                    livereload: true,
                    interval: 500
                }
            },
            css: {
                files: paths.css,
                tasks: ['csslint'],
                options: {
                    livereload: true
                }
            }
        },
        jshint: {
            all: {
                src: paths.js,
                options: {
                    jshintrc: true
                }
            }
        },
        uglify: {
            core: {
                options: {
                    mangle: false
                },
                files: '<%= assets.core.js %>'
            }
        },
        csslint: {
            options: {
                csslintrc: '.csslintrc'
            },
            src: paths.css
        },
        cssmin: {
            core: {
                files: '<%= assets.core.css %>'
            }
        },
        nodemon: {
            dev: {
                script: 'server.js',
                options: {
                    args: [],
                    ignore: ['node_modules/**'],
                    ext: 'js,html',
                    nodeArgs: ['--debug'],
                    delayTime: 1,
                    cwd: __dirname
                }
            }
        },
        concurrent: {
            tasks: ['nodemon', 'watch'],
            options: {
                logConcurrentOutput: true
            }
        },
        mochaTest: {
            options: {
                reporter: 'spec',
                require: [
                    'server.js',
                    function() {
                        require('meanio/lib/util').preload(__dirname + '/packages/**/server', 'model');
                    }
                ]
            },
            src: ['packages/**/server/tests/**/*.js']
        },
        env: {
            test: {
                NODE_ENV: 'test'
            }
        },
        karma: {
            unit: {
                configFile: 'karma.conf.js'
            }
        }
    });

    //Load NPM tasks
    require('load-grunt-tasks')(grunt);

    //Default task(s).
    if (process.env.NODE_ENV === 'production') {
        grunt.registerTask('default', ['clean', 'cssmin', 'uglify', 'concurrent']);
    } else {
        grunt.registerTask('default', ['clean', 'jshint', 'csslint', 'concurrent']);
    }

    //Test task.
    //grunt.registerTask('test', ['env:test', 'mochaTest', 'karma:unit']);
    grunt.registerTask('test', ['env:test', 'mochaTest']);

    // For Heroku users only.
    // Docs: https://github.com/linnovate/mean/wiki/Deploying-on-Heroku
    grunt.registerTask('heroku:production', ['cssmin', 'uglify']);
};
<|endoftext|>


<commit_before>module.exports = function(grunt) {

    grunt.initConfig({

        /**
         * @property pkg
         * @type {Object}
         */
        pkg: grunt.file.readJSON('package.json'),

        /**
         * @property jshint
         * @type {Object}
         */
        jshint: {
            all: 'module/*.js',
            options: {
                jshintrc: '.jshintrc'
            }
        },

        /**
         * @property uglify
         * @type {Object}
         */
        uglify: {
            options: {
                banner: '/*! <%= pkg.name %> by <%= pkg.author %> created on <%= grunt.template.today("yyyy-mm-dd") %> */\n'
            },
            build: {
                src: ['dist/<%= pkg.name %>.js'],
                dest: 'dist/<%= pkg.name %>.min.js'
            }
        },

        /**
         * @property compress
         * @type {Object}
         */
        compress: {
            main: {
                options: {
                    archive: 'releases/<%= pkg.version %>.zip'
                },
                files: [
                    { flatten: true, src: 'dist/<%= pkg.name %>.js', dest: './', filter: 'isFile' }
                ]
            }
        },

        /**
         * @property karma
         * @type {Object}
         */
        karma: {
            unit: {
                configFile: 'KarmaUnit.js',
                background: false,
                browsers: ['Firefox']
            }
        },

        /**
         * @property concat
         * @type {Object}
         */
        concat: {
            options: {
                separator: '\n\n'
            },
            dist: {
                src: ['components/Service.js', 'components/*.js'],
                dest: 'dist/<%= pkg.name %>.js'
            }
        },

        /**
         * @property copy
         * @type {Object}
         */
        copy: {
            vendor: {
                expand: true,
                flatten: true,
                src: ['module/*'],
                dest: 'example/js/vendor/<%= pkg.name %>',
                filter: 'isFile'
            }

        }

    });

//    grunt.loadNpmTasks('grunt-karma');
//    grunt.loadNpmTasks('grunt-contrib-uglify');
//    grunt.loadNpmTasks('grunt-contrib-jshint');
//    grunt.loadNpmTasks('grunt-contrib-compress');
//    grunt.loadNpmTasks('grunt-contrib-concat');
    grunt.loadNpmTasks('grunt-contrib-jshint');
    grunt.loadNpmTasks('grunt-contrib-copy');

    grunt.registerTask('build', ['copy']);
    grunt.registerTask('test', ['jshint']);
    grunt.registerTask('default', ['jshint', 'karma', 'concat', 'copy', 'uglify', 'compress']);

};<commit_msg>Added JSHint<commit_after>module.exports = function(grunt) {

    grunt.initConfig({

        /**
         * @property pkg
         * @type {Object}
         */
        pkg: grunt.file.readJSON('package.json'),

        /**
         * @property jshint
         * @type {Object}
         */
        jshint: {
            all: 'module/*.js',
            options: {
                jshintrc: '.jshintrc'
            }
        },

        /**
         * @property uglify
         * @type {Object}
         */
        uglify: {
            options: {
                banner: '/*! <%= pkg.name %> by <%= pkg.author %> created on <%= grunt.template.today("yyyy-mm-dd") %> */\n'
            },
            build: {
                src: ['dist/<%= pkg.name %>.js'],
                dest: 'dist/<%= pkg.name %>.min.js'
            }
        },

        /**
         * @property compress
         * @type {Object}
         */
        compress: {
            main: {
                options: {
                    archive: 'releases/<%= pkg.version %>.zip'
                },
                files: [
                    { flatten: true, src: 'dist/<%= pkg.name %>.js', dest: './', filter: 'isFile' }
                ]
            }
        },

        /**
         * @property karma
         * @type {Object}
         */
        karma: {
            unit: {
                configFile: 'KarmaUnit.js',
                background: false,
                browsers: ['Firefox']
            }
        },

        /**
         * @property concat
         * @type {Object}
         */
        concat: {
            options: {
                separator: '\n\n'
            },
            dist: {
                src: ['components/Service.js', 'components/*.js'],
                dest: 'dist/<%= pkg.name %>.js'
            }
        },

        /**
         * @property copy
         * @type {Object}
         */
        copy: {
            vendor: {
                expand: true,
                flatten: true,
                src: ['module/*'],
                dest: 'example/js/vendor/<%= pkg.name %>',
                filter: 'isFile'
            }

        }

    });

//    grunt.loadNpmTasks('grunt-karma');
//    grunt.loadNpmTasks('grunt-contrib-uglify');
    grunt.loadNpmTasks('grunt-contrib-jshint');
//    grunt.loadNpmTasks('grunt-contrib-compress');
//    grunt.loadNpmTasks('grunt-contrib-concat');
    grunt.loadNpmTasks('grunt-contrib-jshint');
    grunt.loadNpmTasks('grunt-contrib-copy');

    grunt.registerTask('build', ['copy']);
    grunt.registerTask('test', ['jshint']);
    grunt.registerTask('default', ['jshint', 'karma', 'concat', 'copy', 'uglify', 'compress']);

};<|endoftext|>


<commit_before>/*
 * grunt-purifycss
 * https://github.com/purifycss/grunt-purify-css
 *
 * Copyright (c) 2015 Phoebe Li, Matthew Rourke, Kenny Tran
 * Licensed under the MIT license.
 */

'use strict';

module.exports = function(grunt) {

  // Project configuration.
  grunt.initConfig({
    jshint: {
      all: [
        'Gruntfile.js',
        'tasks/*.js',
        '<%= nodeunit.tests %>'
      ],
      options: {
        jshintrc: '.jshintrc'
      }
    },

    // Before generating any new files, remove any previously-created files.
    clean: {
      tests: ['tmp']
    },

    // Configuration to be run (and then tested).
    purifycss: {
      default_options: {
        options: {
        },
        files: {
          'tmp/default_options': ['test/fixtures/testing', 'test/fixtures/123']
        }
      },
      custom_options: {
        options: {
          separator: ': ',
          punctuation: ' !!!'
        },
        files: {
          'tmp/custom_options': ['test/fixtures/testing', 'test/fixtures/123']
        },
      },
      test: {

        src: ['test/fixtures/*.html'],
        css: ['test/fixtures/styles.css'],
        dest: 'tmp/purestyles.css',
        hello: 'hello world'
      }
    },

    // Unit tests.grunt
    nodeunit: {
      tests: ['test/*_test.js']
    }

  });

  // Actually load this plugin's task(s).
  grunt.loadTasks('tasks');

  // These plugins provide necessary tasks.
  grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-contrib-clean');
  grunt.loadNpmTasks('grunt-contrib-nodeunit');

  // Whenever the "test" task is run, first clean the "tmp" dir, then run this
  // plugin's task(s), then test the result.
  grunt.registerTask('test', ['clean', 'purifycss', 'nodeunit']);

  // By default, lint and run all tests.
  grunt.registerTask('default', ['purifycss:test']);

};
<commit_msg>Expand grunt config examples<commit_after>/*
 * grunt-purifycss
 * https://github.com/purifycss/grunt-purify-css
 *
 * Copyright (c) 2015 Phoebe Li, Matthew Rourke, Kenny Tran
 * Licensed under the MIT license.
 */

'use strict';

module.exports = function(grunt) {

  // Project configuration.
  grunt.initConfig({
    jshint: {
      all: [
        'Gruntfile.js',
        'tasks/*.js',
        '<%= nodeunit.tests %>'
      ],
      options: {
        jshintrc: '.jshintrc'
      }
    },

    // Before generating any new files, remove any previously-created files.
    clean: {
      tests: ['tmp']
    },

    // Configuration to be run (and then tested).
    purifycss: {
      default_options: {
        options: {
        },
        files: {
          'tmp/default_options': ['test/fixtures/testing', 'test/fixtures/123']
        }
      },
      custom_options: {
        options: {
          separator: ': ',
          punctuation: ' !!!'
        },
        files: {
          'tmp/custom_options': ['test/fixtures/testing', 'test/fixtures/123']
        },
      },
      test: {
        src: ['test/fixtures/*.html'],
        css: ['test/fixtures/styles.css'],
        dest: 'tmp/purestyles.css'
      },
      goose: {
        src: [
          'Goose-Windmill/public/app/**/*.html',
          'Goose-Windmill/public/app/**/*.js',
          'Goose-Windmill/public/index.html'
          ],
        css: ['Goose-Windmill/public/styles/*.css'],
        dest: 'tmp/gooseCSS.css'
      }
    },

    // Unit tests.grunt
    nodeunit: {
      tests: ['test/*_test.js']
    }

  });

  // Actually load this plugin's task(s).
  grunt.loadTasks('tasks');

  // These plugins provide necessary tasks.
  grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-contrib-clean');
  grunt.loadNpmTasks('grunt-contrib-nodeunit');

  // Whenever the "test" task is run, first clean the "tmp" dir, then run this
  // plugin's task(s), then test the result.
  grunt.registerTask('test', ['clean', 'purifycss:test', 'nodeunit']);

  // By default, lint and run all tests.
  grunt.registerTask('default', ['purifycss:test']);

};
<|endoftext|>


<commit_before>/*global module:false*/

module.exports = function(grunt) {

  "use strict";

  var itsbeen = "   "
    , st = new Date(1378438867382)
    , ct = new Date()
    , diff = {
      y: ct.getFullYear() - st.getFullYear(),
      m: ct.getMonth() - st.getMonth(),
      d: ct.getDate() - st.getDate()
    };

  itsbeen += "Project started before ";
  itsbeen += (diff.y === 0) ? "" : diff.y === 1 ? 1 + " year, " : ((diff.y < 0 ? 30 - Math.abs(diff.y) : diff.y) + " years") + " and ";
  itsbeen += (diff.m === 0) ? "" : diff.m === 1 ? 1 + " month and " : ((diff.m < 0 ? 30 - Math.abs(diff.m) : diff.m) + " months") + " and ";
  itsbeen += (diff.d === 0) ? "" : diff.d === 1 ? 1 + " day " : ((diff.d < 0 ? 30 - Math.abs(diff.d) : diff.d) + " days");
  itsbeen += "\n";

  // Project configuration.
  grunt.initConfig({

    pkg: grunt.file.readJSON("package.json"),

    banner: "/* ========================= \n" +
      "   <%= pkg.title %> - v<%= pkg.version %>\n" +
      "   ========================= \n" +
      "   <%= grunt.template.today(\"yyyy-mm-dd\") %>\n" +
      itsbeen +
      "   http://erikroyall.github.com/<%= pkg.name %>/\n" +
      "   Copyright (c) 2013 Erik Royall\n" +
      "   Licensed under <%= pkg.license %> (see LICENSE-MIT) \n*/\n\n",

    concat: {
      options: {
        banner: "<%= banner %>",
        stripBanners: true
      },
      dist: {
        src: [
          "src/base.css"
        ],
        dest: "dist/<%= pkg.name %>.css"
      }
    },

    csslint: {
      options: {
        csslintrc: ".csslintrc"
      },
      strict: {
        options: {
          import: 2
        },
        src: ["<%= concat.dist.dest %>"]
      },
      lax: {
        options: {
          import: false
        },
        src: ["<%= concat.dist.dest %>"]
      }
    },

    cssmin: {
      add_banner: {
        options: {
          banner: "<%= banner %>"
        },
        files: {
          "<%= pkg.name %>.min.css": ["<%= concat.dist.dest %>"]
        }
      }
    },

    watch: {
      csslintrc: {
        files: [".csslintrc"],
        tasks: ["concat", "csslint", "cssmin"]
      },

      gruntfile: {
        files: ["Gruntfile.js"],
        tasks: ["concat", "csslint", "cssmin"]
      },

      wozew: {
        files: "<%= concat.dist.dest %>",
        tasks: ["concat", "csslint", "cssmin"]
      }
    }
  });

  // These plugins provide necessary tasks.
  grunt.loadNpmTasks("grunt-contrib-concat");
  grunt.loadNpmTasks("grunt-contrib-watch");
  grunt.loadNpmTasks("grunt-contrib-csslint");
  grunt.loadNpmTasks("grunt-contrib-cssmin");

  // Default task.
  grunt.registerTask("default", ["concat", "csslint", "cssmin", "watch"]);
};
<commit_msg>Modify Gruntfile for CSSLint<commit_after>/*global module:false*/

module.exports = function(grunt) {

  "use strict";

  var itsbeen = " * "
    , st = new Date(1378438867382)
    , ct = new Date()
    , diff = {
      y: ct.getFullYear() - st.getFullYear(),
      m: ct.getMonth() - st.getMonth(),
      d: ct.getDate() - st.getDate()
    };

  itsbeen += "Project started before ";
  itsbeen += (diff.y === 0) ? "" : diff.y === 1 ? 1 + " year, " : ((diff.y < 0 ? 30 - Math.abs(diff.y) : diff.y) + " years") + " and ";
  itsbeen += (diff.m === 0) ? "" : diff.m === 1 ? 1 + " month and " : ((diff.m < 0 ? 30 - Math.abs(diff.m) : diff.m) + " months") + " and ";
  itsbeen += (diff.d === 0) ? "" : diff.d === 1 ? 1 + " day " : ((diff.d < 0 ? 30 - Math.abs(diff.d) : diff.d) + " days");
  itsbeen += "\n";

  // Project configuration.
  grunt.initConfig({

    pkg: grunt.file.readJSON("package.json"),

    banner: "/*! \n * ========================= \n" +
      " * <%= pkg.title %> - v<%= pkg.version %>\n" +
      " * ========================= \n" +
      " * <%= grunt.template.today(\"yyyy-mm-dd\") %>\n" +
      itsbeen +
      " * http://erikroyall.github.com/<%= pkg.name %>/\n" +
      " * Copyright (c) 2013 Erik Royall\n" +
      " * Licensed under <%= pkg.license %> (see LICENSE-MIT) \n */\n\n\r",

    concat: {
      options: {
        banner: "<%= banner %>",
        stripBanners: true
      },
      dist: {
        src: [
          "src/base.css",
          "src/grid.css"
        ],
        dest: "dist/<%= pkg.name %>.css"
      }
    },

    csslint: {
      options: {
        csslintrc: ".csslintrc"
      },
      strict: {
        options: {
          import: 2
        },
        src: ["<%= concat.dist.dest %>"]
      },
      lax: {
        options: {
          import: false
        },
        src: ["<%= concat.dist.dest %>"]
      }
    },

    cssmin: {
      add_banner: {
        files: {
          "dist/<%= pkg.name %>.min.css": ["<%= concat.dist.dest %>"]
        }
      }
    },

    watch: {
      csslintrc: {
        files: [".csslintrc"],
        tasks: ["concat", "csslint", "cssmin"]
      },

      gruntfile: {
        files: ["Gruntfile.js"],
        tasks: ["concat", "csslint", "cssmin"]
      },

      wozew: {
        files: "<%= concat.dist.dest %>",
        tasks: ["concat", "csslint", "cssmin"]
      }
    }
  });

  // These plugins provide necessary tasks.
  grunt.loadNpmTasks("grunt-contrib-concat");
  grunt.loadNpmTasks("grunt-contrib-watch");
  grunt.loadNpmTasks("grunt-contrib-csslint");
  grunt.loadNpmTasks("grunt-contrib-cssmin");

  // Default task.
  grunt.registerTask("default", ["concat", "csslint", "cssmin", "watch"]);
};
<|endoftext|>


<commit_before>module.exports = function(grunt) {

  // Project configuration
  grunt.initConfig({

    // Import metadata
    pkg: grunt.file.readJSON('package.json'),

    // Banner
    banner: '/*!\n' +
            ' * <%= pkg.name %> v<%= pkg.version %>\n' +
            ' * Copyright <%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
            ' * Licensed under the <%= pkg.licenses.type %> license\n' +
            ' */\n',

    // Task configuration
    concat: {
      options: {
        stripBanners: true,
        banner: '<%= banner %>'
      },
      coffee: {
        src: 'js/*.coffee',
        dest: 'js/melvin.coffee'
      },
      less: {
        src: 'css/*.less',
        dest: 'css/melvin.less'
      }
    },

    less: {
      options: {},
      css: {
        expand: true,
        cwd: 'css/',
        src: '*.less',
        dest: 'css/',
        ext: '.css'
      }
    },

    csslint: {
      options: {
        import: false
      },
      css: {
        src: 'css/*.css'
      }
    },

    cssmin: {
      options: {
        banner: '<%= banner %>'
      },
      css: {
        src: 'css/melvin.css',
        dest: 'css/melvin.min.css'
      }
    },

    coffee: {
      options: {},
      js: {
        expand: true,
        cwd: 'js/',
        src: '*.coffee',
        dest: 'js/',
        ext: '.js'
      }
    },

    jshint: {
      options: {
        browser: true,
        camelcase: true,
        curly: true,
        eqeqeq: true,
        eqnull: true,
        jquery: true
      },
      gruntfile: {
        src: 'Gruntfile.js'
      },
      js: {
        src: 'js/*.js'
      }
    },

    uglify: {
      options: {
        banner: '<%= banner %>'
      },
      js: {
        src: 'js/melvin.js',
        dest: 'js/melvin.min.js'
      }
    },

    validation: {
      options: {
        reset: true,
      },
      melvin: {
        src: '_site/**/*.html'
      }
    },

    jekyll: {
      options: {
        serve: true
      }
    },

    watch: {
      less: {
        files: 'css/*.less',
        tasks: 'less'
      },
      css: {
        files: 'css/*.css',
        tasks: 'csslint'
      },
      coffee: {
        files: 'js/*.coffee',
        tasks: 'coffee'
      },
      js: {
        files: 'js/*.js',
        tasks: 'jshint:js'
      }
    }
  });

  // Load plugins
  grunt.loadNpmTasks('grunt-contrib-concat');
  grunt.loadNpmTasks('grunt-contrib-less');
  grunt.loadNpmTasks('grunt-contrib-csslint');
  grunt.loadNpmTasks('grunt-contrib-cssmin');
  grunt.loadNpmTasks('grunt-contrib-coffee');
  grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-html-validation');
  grunt.loadNpmTasks('grunt-jekyll');

  // Test task
  grunt.registerTask('test', ['less', 'csslint', 'coffee', 'jshint', 'jekyll', 'validation']);

  // Distribution task
  grunt.registerTask('dist', ['less', 'coffee', 'concat', 'cssmin', 'uglify']);

  // Default task
  grunt.registerTask('default', ['test', 'dist']);
};

<commit_msg>Fine tune csslint and jshint<commit_after>module.exports = function(grunt) {
  "use strict";

  // Project configuration
  grunt.initConfig({

    // Import metadata
    pkg: grunt.file.readJSON('package.json'),

    // Banner
    banner: '/*!\n' +
            ' * <%= pkg.name %> v<%= pkg.version %>\n' +
            ' * Copyright <%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
            ' * Licensed under the <%= pkg.licenses.type %> license\n' +
            ' */\n',

    // Task configuration
    concat: {
      options: {
        stripBanners: true,
        banner: '<%= banner %>'
      },
      coffee: {
        src: 'js/*.coffee',
        dest: 'js/melvin.coffee'
      },
      less: {
        src: 'css/*.less',
        dest: 'css/melvin.less'
      }
    },

    less: {
      options: {},
      css: {
        expand: true,
        cwd: 'css/',
        src: '*.less',
        dest: 'css/',
        ext: '.css'
      }
    },

    csslint: {
      options: {
        'import': false,
        'regex-selectors': false,
        'unique-headings': false,
        'zero-units': false
      },
      css: {
        src: 'css/*.css'
      }
    },

    cssmin: {
      options: {
        banner: '<%= banner %>'
      },
      css: {
        src: 'css/melvin.css',
        dest: 'css/melvin.min.css'
      }
    },

    coffee: {
      options: {},
      js: {
        expand: true,
        cwd: 'js/',
        src: '*.coffee',
        dest: 'js/',
        ext: '.js'
      }
    },

    jshint: {
      options: {
        browser: true,
        camelcase: true,
        curly: false,
        devel: true,
        eqeqeq: true,
        eqnull: true,
        validthis: true
      },
      gruntfile: {
        src: 'Gruntfile.js'
      },
      js: {
        src: 'js/*.js'
      }
    },

    uglify: {
      options: {
        banner: '<%= banner %>'
      },
      js: {
        src: 'js/melvin.js',
        dest: 'js/melvin.min.js'
      }
    },

    validation: {
      options: {
        reset: true,
      },
      melvin: {
        src: '_site/**/*.html'
      }
    },

    jekyll: {
      options: {
        serve: true
      }
    },

    watch: {
      less: {
        files: 'css/*.less',
        tasks: 'less'
      },
      css: {
        files: 'css/*.css',
        tasks: 'csslint'
      },
      coffee: {
        files: 'js/*.coffee',
        tasks: 'coffee'
      },
      js: {
        files: 'js/*.js',
        tasks: 'jshint:js'
      }
    }
  });

  // Load plugins
  grunt.loadNpmTasks('grunt-contrib-concat');
  grunt.loadNpmTasks('grunt-contrib-less');
  grunt.loadNpmTasks('grunt-contrib-csslint');
  grunt.loadNpmTasks('grunt-contrib-cssmin');
  grunt.loadNpmTasks('grunt-contrib-coffee');
  grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-html-validation');
  grunt.loadNpmTasks('grunt-jekyll');

  // Test task
  grunt.registerTask('test', ['less', 'csslint', 'coffee', 'jshint', 'jekyll', 'validation']);

  // Distribution task
  grunt.registerTask('dist', ['less', 'coffee', 'concat', 'cssmin', 'uglify']);

  // Default task
  grunt.registerTask('default', ['test', 'dist']);
};

<|endoftext|>


<commit_before>module.exports = function( grunt ) {
	"use strict";

	function readOptionalJSON( filepath ) {
		var data = {};
		try {
			data = grunt.file.readJSON( filepath );
		} catch ( e ) {}
		return data;
	}

	var gzip = require( "gzip-js" ),
		srcHintOptions = readOptionalJSON( "src/.jshintrc" );

	// The concatenated file won't pass onevar
	// But our modules can
	delete srcHintOptions.onevar;

	grunt.initConfig({
		pkg: grunt.file.readJSON( "package.json" ),
		dst: readOptionalJSON( "dist/.destination.json" ),
		compare_size: {
			files: [ "dist/jquery.js", "dist/jquery.min.js" ],
			options: {
				compress: {
					gz: function( contents ) {
						return gzip.zip( contents, {} ).length;
					}
				},
				cache: "build/.sizecache.json"
			}
		},
		build: {
			all: {
				dest: "dist/jquery.js",
				minimum: [
					"core",
					"selector"
				],
				// Exclude specified modules if the module matching the key is removed
				removeWith: {
					ajax: [ "manipulation/_evalUrl" ],
					callbacks: [ "deferred" ],
					css: [ "effects", "dimensions", "offset" ],
					sizzle: [ "css/hiddenVisibleSelectors", "effects/animatedSelector" ]
				}
			}
		},
		bowercopy: {
			options: {
				clean: true
			},
			src: {
				files: {
					"src/sizzle": "sizzle"
				}
			},
			tests: {
				options: {
					destPrefix: "test/libs"
				},
				files: {
					"qunit": "qunit/qunit",
					"require.js": "requirejs/require.js",
					"sinon/fake_timers.js": "sinon/lib/sinon/util/fake_timers.js"
				}
			}
		},
		jsonlint: {
			pkg: {
				src: [ "package.json" ]
			},

			jscs: {
				src: [ ".jscs.json" ]
			},

			bower: {
				src: [ "bower.json" ]
			}
		},
		jshint: {
			all: {
				src: [
					"src/**/*.js", "Gruntfile.js", "test/**/*.js", "build/tasks/*",
					"build/{bower-install,release-notes,release}.js"
				],
				options: {
					jshintrc: true
				}
			},
			dist: {
				src: "dist/jquery.js",
				options: srcHintOptions
			}
		},
		jscs: {
			src: "src/**/*.js",
			gruntfile: "Gruntfile.js",
			tasks: "build/tasks/*.js"
		},
		testswarm: {
			tests: "ajax attributes callbacks core css data deferred dimensions effects event manipulation offset queue selector serialize support traversing Sizzle".split( " " )
		},
		watch: {
			files: [ "<%= jshint.grunt.src %>", "<%= jshint.tests.src %>", "src/**/*.js" ],
			tasks: "dev"
		},
		uglify: {
			all: {
				files: {
					"dist/jquery.min.js": [ "dist/jquery.js" ]
				},
				options: {
					preserveComments: false,
					sourceMap: "dist/jquery.min.map",
					sourceMappingURL: "jquery.min.map",
					report: "min",
					beautify: {
						ascii_only: true
					},
					banner: "/*! jQuery v<%= pkg.version %> | " +
						"(c) 2005, 2013 jQuery Foundation, Inc. | " +
						"jquery.org/license */",
					compress: {
						hoist_funs: false,
						loops: false,
						unused: false
					}
				}
			}
		}
	});

	// Load grunt tasks from NPM packages
	require( "load-grunt-tasks" )( grunt );

	// Integrate jQuery specific tasks
	grunt.loadTasks( "build/tasks" );

	// Alias bower to bowercopy
	grunt.registerTask( "bower", "bowercopy" );

	// Short list as a high frequency watch task
	grunt.registerTask( "dev", [ "build:*:*", "jshint", "jscs" ] );

	// Default grunt
	grunt.registerTask( "default", [ "jsonlint", "dev", "uglify", "dist:*", "compare_size" ] );
};
<commit_msg>Gruntfile: fix watch task<commit_after>module.exports = function( grunt ) {
	"use strict";

	function readOptionalJSON( filepath ) {
		var data = {};
		try {
			data = grunt.file.readJSON( filepath );
		} catch ( e ) {}
		return data;
	}

	var gzip = require( "gzip-js" ),
		srcHintOptions = readOptionalJSON( "src/.jshintrc" );

	// The concatenated file won't pass onevar
	// But our modules can
	delete srcHintOptions.onevar;

	grunt.initConfig({
		pkg: grunt.file.readJSON( "package.json" ),
		dst: readOptionalJSON( "dist/.destination.json" ),
		compare_size: {
			files: [ "dist/jquery.js", "dist/jquery.min.js" ],
			options: {
				compress: {
					gz: function( contents ) {
						return gzip.zip( contents, {} ).length;
					}
				},
				cache: "build/.sizecache.json"
			}
		},
		build: {
			all: {
				dest: "dist/jquery.js",
				minimum: [
					"core",
					"selector"
				],
				// Exclude specified modules if the module matching the key is removed
				removeWith: {
					ajax: [ "manipulation/_evalUrl" ],
					callbacks: [ "deferred" ],
					css: [ "effects", "dimensions", "offset" ],
					sizzle: [ "css/hiddenVisibleSelectors", "effects/animatedSelector" ]
				}
			}
		},
		bowercopy: {
			options: {
				clean: true
			},
			src: {
				files: {
					"src/sizzle": "sizzle"
				}
			},
			tests: {
				options: {
					destPrefix: "test/libs"
				},
				files: {
					"qunit": "qunit/qunit",
					"require.js": "requirejs/require.js",
					"sinon/fake_timers.js": "sinon/lib/sinon/util/fake_timers.js"
				}
			}
		},
		jsonlint: {
			pkg: {
				src: [ "package.json" ]
			},

			jscs: {
				src: [ ".jscs.json" ]
			},

			bower: {
				src: [ "bower.json" ]
			}
		},
		jshint: {
			all: {
				src: [
					"src/**/*.js", "Gruntfile.js", "test/**/*.js", "build/tasks/*",
					"build/{bower-install,release-notes,release}.js"
				],
				options: {
					jshintrc: true
				}
			},
			dist: {
				src: "dist/jquery.js",
				options: srcHintOptions
			}
		},
		jscs: {
			src: "src/**/*.js",
			gruntfile: "Gruntfile.js",
			tasks: "build/tasks/*.js"
		},
		testswarm: {
			tests: "ajax attributes callbacks core css data deferred dimensions effects event manipulation offset queue selector serialize support traversing Sizzle".split( " " )
		},
		watch: {
			files: [ "<%= jshint.all.src %>" ],
			tasks: "dev"
		},
		uglify: {
			all: {
				files: {
					"dist/jquery.min.js": [ "dist/jquery.js" ]
				},
				options: {
					preserveComments: false,
					sourceMap: "dist/jquery.min.map",
					sourceMappingURL: "jquery.min.map",
					report: "min",
					beautify: {
						ascii_only: true
					},
					banner: "/*! jQuery v<%= pkg.version %> | " +
						"(c) 2005, 2013 jQuery Foundation, Inc. | " +
						"jquery.org/license */",
					compress: {
						hoist_funs: false,
						loops: false,
						unused: false
					}
				}
			}
		}
	});

	// Load grunt tasks from NPM packages
	require( "load-grunt-tasks" )( grunt );

	// Integrate jQuery specific tasks
	grunt.loadTasks( "build/tasks" );

	// Alias bower to bowercopy
	grunt.registerTask( "bower", "bowercopy" );

	// Short list as a high frequency watch task
	grunt.registerTask( "dev", [ "build:*:*", "jshint", "jscs" ] );

	// Default grunt
	grunt.registerTask( "default", [ "jsonlint", "dev", "uglify", "dist:*", "compare_size" ] );
};
<|endoftext|>


<commit_before>module.exports = function(grunt) {

    // Project configuration.
    grunt.initConfig({

        pkg: grunt.file.readJSON('package.json'),
        jshint: {
            all: ['demo/client/js/banter.js'],
            options: {
                jshintrc: '.jshintrc'
            }
        },
        uglify: {
            options: {
                banner: '/*! <%= pkg.name %> by <%= pkg.author %> created on <%= grunt.template.today("yyyy-mm-dd") %> */\n'
            },
            build: {
                src: 'demo/client/js/banter.js',
                dest: 'dist/banter-<%= pkg.version %>.min.js'
            }
        },
        sass: {
            dist: {
                options: {
                    style: 'nested'
                },
                files: {
                    'dist/banter-<%= pkg.version %>.css': 'demo/client/sass/default.scss'
                }
            }
        }
    });

    grunt.loadNpmTasks('grunt-contrib-uglify');
    grunt.loadNpmTasks('grunt-contrib-jshint');
    grunt.loadNpmTasks('grunt-contrib-sass');

    // Testing.
    grunt.registerTask('test', ['jshint']);
    grunt.registerTask('test', ['uglify', 'sass']);

    // Build.
    grunt.registerTask('default', ['jshint', 'uglify', 'sass']);

};<commit_msg>Changed test to build for Gruntc<commit_after>module.exports = function(grunt) {

    // Project configuration.
    grunt.initConfig({

        pkg: grunt.file.readJSON('package.json'),
        jshint: {
            all: ['demo/client/js/banter.js'],
            options: {
                jshintrc: '.jshintrc'
            }
        },
        uglify: {
            options: {
                banner: '/*! <%= pkg.name %> by <%= pkg.author %> created on <%= grunt.template.today("yyyy-mm-dd") %> */\n'
            },
            build: {
                src: 'demo/client/js/banter.js',
                dest: 'dist/banter-<%= pkg.version %>.min.js'
            }
        },
        sass: {
            dist: {
                options: {
                    style: 'nested'
                },
                files: {
                    'dist/banter-<%= pkg.version %>.css': 'demo/client/sass/default.scss'
                }
            }
        }
    });

    grunt.loadNpmTasks('grunt-contrib-uglify');
    grunt.loadNpmTasks('grunt-contrib-jshint');
    grunt.loadNpmTasks('grunt-contrib-sass');

    // Testing.
    grunt.registerTask('test', ['jshint']);
    grunt.registerTask('build', ['uglify', 'sass']);

    // Build.
    grunt.registerTask('default', ['jshint', 'uglify', 'sass']);

};<|endoftext|>


<commit_before>'use strict';

module.exports = function(grunt) {

  // Project configuration.
  grunt.initConfig({
    // Metadata.
    pkg: grunt.file.readJSON('superslides.jquery.json'),
    banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
      '<%= grunt.template.today("yyyy-mm-dd") %>\n' +
      '<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
      '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
      ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n',
    // Task configuration.
    clean: {
      files: ['dist']
    },
    concat: {
      options: {
        banner: '<%= banner %>',
        stripBanners: true
      },
      dist: {
        src: ['src/<%= pkg.name %>.js'],
        dest: 'dist/jquery.<%= pkg.name %>.js'
      },
    },
    uglify: {
      options: {
        banner: '<%= banner %>'
      },
      dist: {
        src: '<%= concat.dist.dest %>',
        dest: 'dist/jquery.<%= pkg.name %>.min.js'
      },
    },
    qunit: {
      files: ['test/**/*.html']
    },
    jshint: {
      gruntfile: {
        options: {
          jshintrc: '.jshintrc'
        },
        src: 'Gruntfile.js'
      },
      src: {
        options: {
          jshintrc: 'src/.jshintrc'
        },
        src: ['src/**/*.js']
      },
      test: {
        options: {
          jshintrc: 'test/.jshintrc'
        },
        src: ['test/**/*.js']
      },
    },
    compass: {
      sassDir: 'scss',
      cssDir: 'dist/stylesheets',
      noLineComments: true
    },
    watch: {
      gruntfile: {
        files: '<%= jshint.gruntfile.src %>',
        tasks: ['jshint:gruntfile']
      },
      src: {
        files: ['<%= jshint.src.src %>', 'scss/*'],
        tasks: ['compass', 'jshint:src', 'qunit']
      },
      test: {
        files: '<%= jshint.test.src %>',
        tasks: ['jshint:test', 'qunit']
      },
    },
  });

  // These plugins provide necessary tasks.
  grunt.loadNpmTasks('grunt-contrib-clean');
  grunt.loadNpmTasks('grunt-contrib-concat');
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-contrib-qunit');
  grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-contrib-compass');

  // Default task.
  grunt.registerTask('default', ['jshint', 'qunit', 'clean', 'concat', 'uglify']);

};
<commit_msg>Update gruntfile<commit_after>'use strict';

module.exports = function(grunt) {

  // Project configuration.
  grunt.initConfig({
    // Metadata.
    pkg: grunt.file.readJSON('superslides.jquery.json'),
    banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
      '<%= grunt.template.today("yyyy-mm-dd") %>\n' +
      '<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
      '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
      ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n',
    // Task configuration.
    clean: {
      files: ['dist']
    },
    concat: {
      options: {
        banner: '<%= banner %>',
        stripBanners: true
      },
      dist: {
        src: ['src/<%= pkg.name %>.js'],
        dest: 'dist/jquery.<%= pkg.name %>.js'
      },
    },
    uglify: {
      options: {
        banner: '<%= banner %>'
      },
      dist: {
        src: '<%= concat.dist.dest %>',
        dest: 'dist/jquery.<%= pkg.name %>.min.js'
      },
    },
    qunit: {
      files: ['test/**/*.html']
    },
    jshint: {
      gruntfile: {
        options: {
          jshintrc: '.jshintrc'
        },
        src: 'Gruntfile.js'
      },
      src: {
        options: {
          jshintrc: 'src/.jshintrc'
        },
        src: ['src/**/*.js']
      },
      test: {
        options: {
          jshintrc: 'test/.jshintrc'
        },
        src: ['test/**/*.js']
      },
    },
    compass: {
      sassDir: 'scss',
      cssDir: 'dist/stylesheets',
      noLineComments: true
    },
    watch: {
      gruntfile: {
        files: '<%= jshint.gruntfile.src %>',
        tasks: ['jshint:gruntfile']
      },
      src: {
        files: ['<%= jshint.src.src %>', 'scss/*'],
        tasks: ['compass', 'jshint:src', 'qunit', 'concat']
      },
      test: {
        files: '<%= jshint.test.src %>',
        tasks: ['jshint:test', 'qunit']
      },
    },
  });

  // These plugins provide necessary tasks.
  grunt.loadNpmTasks('grunt-contrib-clean');
  grunt.loadNpmTasks('grunt-contrib-concat');
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-contrib-qunit');
  grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-contrib-compass');

  // Default task.
  grunt.registerTask('default', ['jshint', 'qunit', 'clean', 'concat', 'uglify']);

};
<|endoftext|>