Skip to content

Instantly share code, notes, and snippets.

@ronaldroe
Created March 8, 2016 23:05
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 ronaldroe/5860c05156297dd0ee28 to your computer and use it in GitHub Desktop.
Save ronaldroe/5860c05156297dd0ee28 to your computer and use it in GitHub Desktop.
My Wordpress Theme Dev Grunt Setup
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist:{
options: {
style: 'expanded',
compass: true
},
files: {
'style.css': 'css/style.scss'
}
}
},
autoprefixer: {
options: {
browsers: ['last 2 versions']
},
no_dest: {
src: 'style.css'
}
},
watch: {
sass: {
files: ['css/style.scss'],
tasks: ['sass', 'autoprefixer'],
},
src: {
files: ['*.css', 'scripts/*.js'],
options: {
livereload: true,
}
}
},
});
// Load the plugins
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-autoprefixer');
// Default task(s).
grunt.registerTask('default', ['sass', 'autoprefixer', 'watch']);
};
{
"name": "Ron Roe Grunt Setup for Wordpress",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "node ./bin/www"
},
"dependencies": {
"node-compass": "0.2.3",
"grunt": "~0.4.2",
"grunt-contrib-sass": "~0.7.3",
"grunt-contrib-watch": "~0.6.1",
"grunt-autoprefixer": "~0.7.2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment