Skip to content

Instantly share code, notes, and snippets.

@sdvg
Created August 10, 2013 15:41
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 sdvg/f0a881cfc0ae9e412e01 to your computer and use it in GitHub Desktop.
Save sdvg/f0a881cfc0ae9e412e01 to your computer and use it in GitHub Desktop.
module.exports = function (grunt) {
'use strict';
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
files: {
'css/global.css': 'sass/global.scss'
},
options: {
sourcemap: 'true'
}
}
},
autoprefixer: {
options: {
browsers: ['last 2 versions']
},
dist: {
files: {
'css/global.css': 'css/global.css'
}
}
},
watch: {
sass: {
files: ['sass/**/*.scss'],
tasks: ['sass:dist']
},
styles: {
files: ['css/global.css'],
tasks: ['autoprefixer']
},
livereload: {
files: ['*.html', '*.php', 'js/**/*.{js,json}', 'css/global.css', 'img/**/*.{png,jpg,jpeg,gif,webp,svg}'],
options: {
livereload: true
}
}
}
});
grunt.registerTask('default', ['watch']);
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-autoprefixer');
grunt.loadNpmTasks('grunt-contrib-watch');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment