aboutsummaryrefslogtreecommitdiffhomepage
path: root/Gruntfile.js
diff options
context:
space:
mode:
Diffstat (limited to 'Gruntfile.js')
-rw-r--r--Gruntfile.js20
1 files changed, 17 insertions, 3 deletions
diff --git a/Gruntfile.js b/Gruntfile.js
index fa0c2026c..df7958c4f 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -5,6 +5,7 @@ module.exports = function (grunt) {
5 dist: 'dist', 5 dist: 'dist',
6 jade: 'views/**/**/*.jade', 6 jade: 'views/**/**/*.jade',
7 css: 'public/stylesheets/*.css', 7 css: 'public/stylesheets/*.css',
8 scss: 'public/stylesheets/*.scss',
8 vendor: 'public/stylesheets/vendor', 9 vendor: 'public/stylesheets/vendor',
9 js: 'public/javascripts/*.js', 10 js: 'public/javascripts/*.js',
10 src: 'src/*.js', 11 src: 'src/*.js',
@@ -34,8 +35,8 @@ module.exports = function (grunt) {
34 }, 35 },
35 copy: { 36 copy: {
36 dev: { 37 dev: {
37 cwd: 'node_modules/bootstrap/dist/', 38 cwd: 'node_modules/bootstrap-sass/assets/',
38 src: [ 'css/*', 'fonts/*' ], 39 src: [ 'fonts/bootstrap/*' ],
39 expand: true, 40 expand: true,
40 dest: paths.vendor 41 dest: paths.vendor
41 } 42 }
@@ -45,7 +46,7 @@ module.exports = function (grunt) {
45 files: [{ 46 files: [{
46 dot: true, 47 dot: true,
47 src: [ 48 src: [
48 paths.browserified 49 paths.browserified, 'public/stylesheets/global.css', paths.vendor
49 ] 50 ]
50 }] 51 }]
51 } 52 }
@@ -62,6 +63,13 @@ module.exports = function (grunt) {
62 } 63 }
63 } 64 }
64 }, 65 },
66 sass: {
67 dev: {
68 files: {
69 'public/stylesheets/global.css': paths.scss
70 }
71 }
72 },
65 watch: { 73 watch: {
66 express: { 74 express: {
67 files: [ paths.main, paths.routes, paths.src ], 75 files: [ paths.main, paths.routes, paths.src ],
@@ -83,11 +91,14 @@ module.exports = function (grunt) {
83 91
84 // Build client javascript and copy bootstrap dependencies 92 // Build client javascript and copy bootstrap dependencies
85 grunt.registerTask('build', [], function () { 93 grunt.registerTask('build', [], function () {
94 grunt.loadNpmTasks('grunt-sass')
86 grunt.loadNpmTasks('grunt-browserify') 95 grunt.loadNpmTasks('grunt-browserify')
87 grunt.loadNpmTasks('grunt-contrib-copy') 96 grunt.loadNpmTasks('grunt-contrib-copy')
88 grunt.loadNpmTasks('grunt-newer') 97 grunt.loadNpmTasks('grunt-newer')
89 98
99 // TODO: SASS --> newer
90 grunt.task.run( 100 grunt.task.run(
101 'sass:dev',
91 'newer:browserify:dev', 102 'newer:browserify:dev',
92 'newer:copy:dev' 103 'newer:copy:dev'
93 ) 104 )
@@ -95,13 +106,16 @@ module.exports = function (grunt) {
95 106
96 // Start in dev mode (reload front end files without refresh) 107 // Start in dev mode (reload front end files without refresh)
97 grunt.registerTask('dev', [], function () { 108 grunt.registerTask('dev', [], function () {
109 grunt.loadNpmTasks('grunt-sass')
98 grunt.loadNpmTasks('grunt-browserify') 110 grunt.loadNpmTasks('grunt-browserify')
99 grunt.loadNpmTasks('grunt-contrib-watch') 111 grunt.loadNpmTasks('grunt-contrib-watch')
100 grunt.loadNpmTasks('grunt-express-server') 112 grunt.loadNpmTasks('grunt-express-server')
101 grunt.loadNpmTasks('grunt-contrib-copy') 113 grunt.loadNpmTasks('grunt-contrib-copy')
102 grunt.loadNpmTasks('grunt-newer') 114 grunt.loadNpmTasks('grunt-newer')
103 115
116 // TODO: SASS --> newer
104 grunt.task.run( 117 grunt.task.run(
118 'sass:dev',
105 'newer:browserify:dev', 119 'newer:browserify:dev',
106 'newer:copy:dev', 120 'newer:copy:dev',
107 'express:dev', 121 'express:dev',