Skip to content

Commit

Permalink
Update Gruntfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Jelte Lagendijk committed Feb 1, 2016
1 parent eafe35d commit ba4943a
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -59,25 +62,25 @@ 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',
compass: true
},
files: [{
expand: true,
cwd: sourceFolder,
src: ['*.scss'],
dest: sourceFolder,
cwd: sourceSassFolder,
src: ['**/*.scss'],
dest: sourceCssFolder,
ext: '.css'
}]
}
Expand All @@ -86,8 +89,8 @@ module.exports = function (grunt) {
dev: {
files: [
{
dest: deploymentFolder,
cwd: sourceFolder,
dest: deploymentCssFolder,
cwd: sourceCssFolder,
src: ["**/*.css*"],
expand: true
}
Expand All @@ -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');
Expand Down

0 comments on commit ba4943a

Please sign in to comment.