Created
August 4, 2013 04:24
-
-
Save GreenGeorge/6149112 to your computer and use it in GitHub Desktop.
Gruntfile configs i normally use for wordpress development. still lacks build tasks. Based heavily on Yeoman's grunt workflow
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
/* Grunt tasks for developing wordpress themes to suit George Ananda's workflow | |
Autoloads all grunt modules via matchdep | |
Configures Dev and Dist directory variables for use in tasks | |
Initializes Grunt : | |
Watch : Watch html, php, css, js, & img files - livereloads browser on change | |
Watch sass files - compiles into css with compass on change | |
Open : Opens dev url on browser | |
Compass : Compiles files on sass folder to css | |
*/ | |
'use strict'; | |
module.exports = function(grunt) { | |
// Load all grunt tasks | |
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); | |
var pathConfig = { | |
app: '', | |
dist: 'dist' | |
}; | |
grunt.initConfig({ | |
project: pathConfig, | |
// WATCH | |
watch: { | |
files: [ | |
'{,*/}*.html', | |
'{,*/}*.php', | |
'{,*/}*.css', | |
'{,*/}*.js', | |
'{,*/}img.*' | |
], | |
sass: { | |
files: 'sass/{,*/}*.scss', | |
tasks: 'compass' | |
}, | |
options: { | |
livereload: true | |
} | |
}, | |
// OPEN | |
open: { | |
dev: { | |
url: 'http://localhost:8888/polymath/polysite/polywp' | |
} | |
}, | |
// COMPASS | |
compass: { | |
dev: { | |
options: { | |
sassDir: 'sass', | |
cssDir: '', | |
// outputStyle: 'compressed' | |
} | |
} | |
} | |
}); | |
grunt.registerTask('default', [ | |
'watch', | |
'open' | |
]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment