Created
March 8, 2016 23:05
-
-
Save ronaldroe/5860c05156297dd0ee28 to your computer and use it in GitHub Desktop.
My Wordpress Theme Dev Grunt Setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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']); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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