Skip to content

Instantly share code, notes, and snippets.

@abdobouna
Created January 2, 2016 01:52
Show Gist options
  • Save abdobouna/b00c507c0faed997f2f8 to your computer and use it in GitHub Desktop.
Save abdobouna/b00c507c0faed997f2f8 to your computer and use it in GitHub Desktop.
module.exports = function (grunt) {
grunt.loadNpmTasks( 'grunt-sass' );
grunt.loadNpmTasks( 'grunt-autoprefixer' );
grunt.loadNpmTasks( 'grunt-contrib-cssmin' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.initConfig({
autoprefixer: {
dev: {
files: {
'style.css': 'style.css',
}
}
},
sass: {
options: { sourceMap: true },
dev: {
files: {
'style.css': 'sass/main.scss'
}
}
},
cssmin: {
dev: {
files: {
'style.css': ['style.css']
}
}
},
watch: {
options: {
livereload: true
},
styles: {
files: ['sass/**/*.scss'],
tasks: ['sass:dev', 'autoprefixer', 'cssmin']
},
}
});
// make `watch` the default task.
grunt.registerTask( 'default', 'watch' );
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment