Created
March 12, 2014 16:25
-
-
Save zoerooney/9510561 to your computer and use it in GitHub Desktop.
Grunt files for posterity (we've switched to Gulp)
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
'use strict'; | |
module.exports = function(grunt) { | |
// load all grunt tasks that start with 'grunt-' | |
require('load-grunt-tasks')(grunt); | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
compass: { | |
dist: { | |
options: { | |
sassDir: 'scss', | |
cssDir: '.', | |
// require: 'breakpoint', | |
// environment: 'production' | |
} | |
} | |
}, | |
autoprefixer: { | |
dist: { | |
files: { | |
'style.max.css': 'style.max.css' | |
} | |
} | |
}, | |
cssmin: { | |
minify: { | |
expand: true, | |
src: [ 'style.max.css' ], | |
dest: '.', | |
ext: '.css' | |
} | |
}, | |
imagemin: { | |
png: { | |
options: { | |
optimizationLevel: 7 | |
}, | |
files: [ | |
{ | |
expand: true, | |
cwd: './images/', | |
src: ['*.png'], | |
dest: './images/compressed/', | |
ext: '.png' | |
} | |
] | |
}, | |
jpg: { | |
options: { | |
progressive: true | |
}, | |
files: [ | |
{ | |
expand: true, | |
cwd: './images/', | |
src: ['*.jpg'], | |
dest: './images/compressed/', | |
ext: '.jpg' | |
} | |
] | |
} | |
}, | |
watch: { | |
compass: { | |
files: ['scss/{,*/}*.scss'], | |
tasks: ['compass:dist'] | |
}, | |
csspostprocess: { | |
files: 'style.max.css', | |
tasks: ['autoprefixer', 'cssmin'] | |
}, | |
livereload: { | |
options: { livereload: true }, | |
files: ['scss/{,*/}*.scss', '*.php', 'images/*'] | |
}, | |
}, | |
concat: { | |
// concat task configuration goes here. | |
}, | |
uglify: { | |
// uglify task configuration goes here. | |
}, | |
}); | |
// Tells Grunt what to do when we type in "grunt" in Terminal | |
grunt.registerTask('default', ['compass','autoprefixer','imagemin','cssmin']); | |
grunt.registerTask('dev', ['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": "emi-theme", | |
"version": "0.1.0", | |
"devDependencies": { | |
"grunt": "~0.4.1", | |
"grunt-contrib-uglify": "~0.2.6", | |
"grunt-contrib-concat": "~0.3.0", | |
"grunt-contrib-imagemin": "~0.4.0", | |
"grunt-contrib-cssmin": "~0.7.0", | |
"grunt-contrib-watch": "~0.5.3", | |
"load-grunt-tasks": "~0.2.0", | |
"grunt-autoprefixer": "~0.4.2", | |
"grunt-cli": "~0.1.11", | |
"grunt-contrib-compass": "~0.7.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment