From e5e7517b62c328880f4b510c36729deb55703787 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Sun, 22 Nov 2015 11:34:48 +0100 Subject: Use bootstrap sass --- Gruntfile.js | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'Gruntfile.js') 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) { dist: 'dist', jade: 'views/**/**/*.jade', css: 'public/stylesheets/*.css', + scss: 'public/stylesheets/*.scss', vendor: 'public/stylesheets/vendor', js: 'public/javascripts/*.js', src: 'src/*.js', @@ -34,8 +35,8 @@ module.exports = function (grunt) { }, copy: { dev: { - cwd: 'node_modules/bootstrap/dist/', - src: [ 'css/*', 'fonts/*' ], + cwd: 'node_modules/bootstrap-sass/assets/', + src: [ 'fonts/bootstrap/*' ], expand: true, dest: paths.vendor } @@ -45,7 +46,7 @@ module.exports = function (grunt) { files: [{ dot: true, src: [ - paths.browserified + paths.browserified, 'public/stylesheets/global.css', paths.vendor ] }] } @@ -62,6 +63,13 @@ module.exports = function (grunt) { } } }, + sass: { + dev: { + files: { + 'public/stylesheets/global.css': paths.scss + } + } + }, watch: { express: { files: [ paths.main, paths.routes, paths.src ], @@ -83,11 +91,14 @@ module.exports = function (grunt) { // Build client javascript and copy bootstrap dependencies grunt.registerTask('build', [], function () { + grunt.loadNpmTasks('grunt-sass') grunt.loadNpmTasks('grunt-browserify') grunt.loadNpmTasks('grunt-contrib-copy') grunt.loadNpmTasks('grunt-newer') + // TODO: SASS --> newer grunt.task.run( + 'sass:dev', 'newer:browserify:dev', 'newer:copy:dev' ) @@ -95,13 +106,16 @@ module.exports = function (grunt) { // Start in dev mode (reload front end files without refresh) grunt.registerTask('dev', [], function () { + grunt.loadNpmTasks('grunt-sass') grunt.loadNpmTasks('grunt-browserify') grunt.loadNpmTasks('grunt-contrib-watch') grunt.loadNpmTasks('grunt-express-server') grunt.loadNpmTasks('grunt-contrib-copy') grunt.loadNpmTasks('grunt-newer') + // TODO: SASS --> newer grunt.task.run( + 'sass:dev', 'newer:browserify:dev', 'newer:copy:dev', 'express:dev', -- cgit v1.2.3