Skip to content

Instantly share code, notes, and snippets.

@oknoway
Created July 17, 2013 04:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oknoway/6017726 to your computer and use it in GitHub Desktop.
Save oknoway/6017726 to your computer and use it in GitHub Desktop.
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
notify: {
watch: {
options: {
title: 'Done Grunting!',
message: 'SASS complete.'
}
}
},
dirs: {
dirs: {
dest: 'lib/',
scss: 'scss/',
js: 'js/'
},
},
bower: {
dev: {
dest: '<% dirs.dest %>',
options: {
stripJsAffix: false
}
}
},
bowerInstall: {
install: {
options: {
verbose: true,
layout: 'byType',
cleanTargetDir: true
}
}
},
rename: {
scss: {
src: 'lib/scss/flexslider/flexslider.css',
dest: 'scss/flexslider.scss'
}
},
concat: {
libs: {
files: {
'js/head.lib.js' : [ 'lib/js/modernizr/modernizr.js' ],
'js/script.lib.js' : [ 'lib/js/jquery/jquery.js','lib/js/flexslider/jquery.flexslider.js','lib/js/isotope/jquery.isotope.js' ]
}
},
script: {
files: {
'js/script.dev.js' : [ 'js/script.lib.js','js/script.js' ]
}
},
head: {
files: {
'js/head.dev.js' : [ 'js/head.lib.js','js/head.js' ]
}
}
},
uglify: {
head: {
files: {
'js/head.min.js' : [ 'js/head.dev.js' ]
}
},
script: {
files: {
'js/script.min.js' : [ 'js/script.dev.js' ]
}
}
},
sass: {
options: {
trace: true,
compass: false,
loadPath: [
'lib/matter/'
]
},
dist: {
options: {
style: 'compressed'
},
files: {
'style.css' : 'scss/style.scss',
'style-admin.css' : 'scss/admin.scss'
}
},
dev: {
options: {
style: 'expanded'
},
files: {
'style.css' : 'scss/style.scss',
'style-admin.css' : 'scss/admin.scss'
}
}
},
watch: {
options: {
livereload: true
},
scss: {
files: 'scss/*',
tasks: [ 'sass:dev' ]
},
head: {
files: [ 'js/head.js' ],
tasks: [ 'concat:head' ]
},
script: {
files: [ 'js/script.js' ],
tasks: [ 'concat:script' ]
},
libs: {
files: [ 'js/*.lib.js' ],
tasks: [ 'concat:libs' ]
},
uglify: {
files: 'js/*.dev.js',
tasks: [ 'uglify' ]
}
}
});
grunt.loadNpmTasks( 'grunt-bower-task' );
grunt.renameTask( 'bower', 'bowerInstall' );
grunt.loadNpmTasks( 'grunt-bower' );
grunt.loadNpmTasks( 'grunt-rename' );
grunt.loadNpmTasks( 'grunt-contrib-sass' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-contrib-concat' );
grunt.loadNpmTasks( 'grunt-contrib-uglify' );
grunt.loadNpmTasks( 'grunt-notify' );
grunt.registerTask( 'default', [ 'build', 'watch' ] );
grunt.registerTask( 'build', [ 'bowerInstall', 'bower', 'rename', 'concat', 'sass', 'uglify' ] );
grunt.registerTask( 'prod', [ 'sass:dist', 'uglify' ] );
};
@jpdevries
Copy link

eh um, it's Sass not SASS ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment