3 module.exports = function (grunt) {
6 jade: 'views/**/**/*.jade',
7 css: 'public/stylesheets/*.css',
8 vendor: 'public/stylesheets/vendor',
9 js: 'public/javascripts/*.js',
11 routes: 'routes/**/*.js',
13 browserified: 'public/javascripts/bundle.js',
14 img: 'public/images/*.{png,jpg,jpeg,gif,webp,svg}',
19 require('time-grunt')(grunt)
21 // Project Configuration
24 pkg: grunt.file.readJSON('package.json'),
27 src: [ paths.js, '!public/javascripts/bundle.js' ],
28 dest: paths.browserified,
30 browserifyOptions: { 'debug': true },
37 cwd: 'node_modules/bootstrap/dist/',
38 src: [ 'css/*', 'fonts/*' ],
59 node_env: 'development',
67 files: [ paths.main, paths.routes, paths.src ],
68 tasks: [ 'express:dev' ],
75 files: [ paths.jade, paths.css, paths.browserified ],
84 // Build client javascript and copy bootstrap dependencies
85 grunt.registerTask('build', [], function () {
86 grunt.loadNpmTasks('grunt-browserify')
87 grunt.loadNpmTasks('grunt-contrib-copy')
88 grunt.loadNpmTasks('grunt-newer')
91 'newer:browserify:dev',
96 // Start in dev mode (reload front end files without refresh)
97 grunt.registerTask('dev', [], function () {
98 grunt.loadNpmTasks('grunt-browserify')
99 grunt.loadNpmTasks('grunt-contrib-watch')
100 grunt.loadNpmTasks('grunt-express-server')
101 grunt.loadNpmTasks('grunt-contrib-copy')
102 grunt.loadNpmTasks('grunt-newer')
105 'newer:browserify:dev',
113 grunt.registerTask('clean', [], function () {
114 grunt.loadNpmTasks('grunt-contrib-clean')