Skip to content

Instantly share code, notes, and snippets.

@tsmith512
Created January 19, 2015 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tsmith512/5d092f48bdd39a18397f to your computer and use it in GitHub Desktop.
Save tsmith512/5d092f48bdd39a18397f to your computer and use it in GitHub Desktop.
Sample Grunt Excerpt: Grunticons
grunticon: {
development: {
files: [{
expand: true,
cwd: 'temp-icons/icons',
// The source of my SVGs output them at 512px, so using a find-replace script,
// we copied them to temp-icons/icons and changed the canvas size to 32px
src: ['*.svg'],
dest: "temp-icons/grunticon",
// We saved them in temp-icons/grunticon so that image minification would
// pick up them up here, minify the PNGs fallbacks, and save copy them over
// to the dist images directory.
}],
options: {
previewhtml: "icons.html",
defaultWidth: "64px",
defaultHeight: "64px",
colors: {
red: '#b00911',
red_dark: '#71060b',
blue: '#149ce4',
light: '#8d7b7b',
highlight: '#fefefe',
purple: '#343c8c',
},
customselectors: {
"abuse": [".flag-wp-flag-comments-abuse .flag-action"],
"abuse-red": [".icon-abuse:hover", ".flag-wp-flag-comments-abuse a:hover"],
"abuse-red_dark": [".icon-abuse.unflag-action"],
"next-blue": [".icon-next:hover", "#cboxNext:hover"],
"next-highlight": ["#cboxNext"],
"prev-blue": [".icon-prev:hover", "#cboxPrevious:hover"],
"prev-highlight": ["#cboxPrevious"],
"private-highlight": [".field-name-field-post-access input:checked + label .icon-private"],
"public-highlight": [".field-name-field-post-access input:checked + label .icon-public"],
}
}
}
},
@coljung
Copy link

coljung commented Jan 19, 2015

Great, thanks!
Will test it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment