Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.