From ba4943aa612783cea4359294ee62b9bf0e95d34a Mon Sep 17 00:00:00 2001 From: Jelte Lagendijk Date: Mon, 1 Feb 2016 16:22:29 +0100 Subject: [PATCH] Update Gruntfile --- Gruntfile.js | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index b5d3a61..8f897ac 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -34,13 +34,16 @@ function getPathFromHere (p) { return path.join(shelljs.pwd(), p); } -var sourceFolder = './' + sourceStyleFolder + '/'; -var deploymentFolder = getPathFromHere('./deployment/web/' + deploymentStyleFolder); +var sourceFolder = './' + sourceStyleFolder + '/', + sourceSassFolder = sourceFolder + 'sass/', + sourceCssFolder = sourceFolder + 'css/'; + +var deploymentFolder = './deployment/web/' + deploymentStyleFolder, + deploymentCssFolder = deploymentFolder + '/css/'; module.exports = function (grunt) { var pkg = grunt.file.readJSON("package.json"); - grunt.verbose; grunt.initConfig({ watch: { sass: { @@ -59,15 +62,15 @@ module.exports = function (grunt) { } }, sass: { - dist: { - files: [{ - expand: true, - cwd: 'styles', - src: ['*.scss'], - dest: '../public', - ext: '.css' - }] - }, + // dev: { + // options: { + // style: 'expanded' + // }, + // files: { + // './theme/styles/css/custom/custom.css': './theme/styles/sass/custom/custom.scss', + // './theme/styles/css/lib/lib.css': './theme/styles/sass/lib/lib.scss' + // } + // }, dev: { options: { style: 'expanded', @@ -75,9 +78,9 @@ module.exports = function (grunt) { }, files: [{ expand: true, - cwd: sourceFolder, - src: ['*.scss'], - dest: sourceFolder, + cwd: sourceSassFolder, + src: ['**/*.scss'], + dest: sourceCssFolder, ext: '.css' }] } @@ -86,8 +89,8 @@ module.exports = function (grunt) { dev: { files: [ { - dest: deploymentFolder, - cwd: sourceFolder, + dest: deploymentCssFolder, + cwd: sourceCssFolder, src: ["**/*.css*"], expand: true } @@ -107,7 +110,7 @@ module.exports = function (grunt) { } }); - grunt.loadNpmTasks('grunt-contrib-copy') + grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-sass'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-browser-sync');