3 module.exports = function (grunt) {
6 jade: 'views/**/**/*.jade',
7 css: 'public/stylesheets/*.css',
8 scss: 'public/stylesheets/application.scss',
9 vendor: 'public/stylesheets/vendor',
10 js: 'public/javascripts/*.js',
12 routes: 'routes/**/*.js',
14 browserified: 'public/javascripts/bundle.js',
15 img: 'public/images/*.{png,jpg,jpeg,gif,webp,svg}',
20 require('time-grunt')(grunt)
22 // Project Configuration
25 pkg: grunt.file.readJSON('package.json'),
28 src: [ paths.js, '!public/javascripts/bundle.js' ],
29 dest: paths.browserified,
31 browserifyOptions: { 'debug': true },
38 logConcurrentOutput: true
40 dev: [ 'watch:livereload', 'watch:sass', 'express:dev' ]
44 cwd: 'node_modules/bootstrap-sass/assets/',
45 src: [ 'fonts/bootstrap/*' ],
55 paths.browserified, 'public/stylesheets/global.css', paths.vendor
66 node_env: 'development',
74 includePaths: [ 'node_modules/bootstrap-sass/assets/stylesheets/' ]
78 'public/stylesheets/global.css': paths.scss
84 files: [ paths.jade, paths.css, paths.browserified ],
91 files: [ paths.scss ],
97 // Load automatically all the tasks
98 require('load-grunt-tasks')(grunt)
100 // Build client javascript and copy bootstrap dependencies
101 grunt.registerTask('build', [ 'sass:dev', 'newer:browserify:dev', 'newer:copy:dev' ])
103 // Start in dev mode (reload front end files without refresh)
104 grunt.registerTask('dev', [ 'sass:dev', 'newer:browserify:dev', 'newer:copy:dev', 'concurrent:dev' ])
107 grunt.registerTask('clean', [], function () {
108 grunt.loadNpmTasks('grunt-contrib-clean')