Skip to content

Instantly share code, notes, and snippets.

@greenhornet79
Created July 25, 2016 20:53
Show Gist options
  • Save greenhornet79/b833ed7fcc13f27fe13dc458e1cedc87 to your computer and use it in GitHub Desktop.
Save greenhornet79/b833ed7fcc13f27fe13dc458e1cedc87 to your computer and use it in GitHub Desktop.
a basic Gruntfile for a WordPress theme
module.exports = function(grunt) {
grunt.initConfig({
sass: {
dist: {
options: {
style: 'compressed',
debugInfo: true
},
files: {
'css/global.css':'scss/global.scss',
}
}
},
watch: {
css: {
files: '**/*.scss',
tasks: ['sass']
}
},
perfbudget: {
default: {
options: {
url: 'http://google.com',
key: 'API_KEY_HERE'
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-perfbudget');
grunt.registerTask('default', ['watch']);
grunt.registerTask('budget', ['perfbudget'])
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment