Permalink
Browse files

Make pngcrush false by default

  • Loading branch information...
1 parent 1d70d2f commit 8cbffa120ddd78f073caee17f1cfdb5f531ecc70 @jefflembeck jefflembeck committed Oct 22, 2013
Showing with 8 additions and 15 deletions.
  1. +1 −1 Gruntfile.js
  2. +1 −1 package.json
  3. +6 −13 tasks/grunticon.js
View
@@ -24,7 +24,7 @@ module.exports = function(grunt) {
// SVGO compression, false is the default, true will make it so
svgo: true,
- // PNG compression, true is the default, false will skip it
+ // PNG compression, false is the default, true will make it so
pngcrush: true,
// CSS filenames
View
@@ -1,7 +1,7 @@
{
"name": "grunt-grunticon",
"description": "A mystical CSS icon solution",
- "version": "0.6.13",
+ "version": "0.6.14",
"homepage": "https://github.com/filamentgroup/grunticon",
"author": {
"name": "Scott Jehl",
View
@@ -251,7 +251,7 @@ module.exports = function( grunt , undefined ) {
- var callPhantom = function( pngf, temp, writeCSS , callback){
+ var callPhantom = function( pngf, writeCSS , callback){
// take it to phantomjs to do the rest
grunt.log.write( "\ngrunticon now spawning phantomjs..." );
var phantomJsPath = require('phantomjs').path;
@@ -276,7 +276,7 @@ module.exports = function( grunt , undefined ) {
width,
height,
colors,
- temp,
+ true,
writeCSS
],
fallback: ''
@@ -355,30 +355,23 @@ module.exports = function( grunt , undefined ) {
});
};
- // Get this party started
- if( compressPNG !== false ){
- render = true;
- writeCSS = false;
- } else {
- render = true;
- writeCSS = true;
- }
+ writeCSS = !compressPNG;
var pngpath;
- if( render && writeCSS ){
+ if( writeCSS ){
pngpath = pngfolder;
} else {
pngpath = path.join( "tmp", pngfolder , path.sep );
}
- callPhantom( pngpath, render, writeCSS, function(err, result, code) {
+ callPhantom( pngpath, writeCSS, function(err, result, code) {
// TODO boost this up a bit.
if( err ){
grunt.log.write("\nSomething went wrong with phantomjs...");
grunt.fatal( result.stderr );
done( false );
} else {
grunt.log.write( result.stdout );
- if( render && writeCSS ){
+ if( writeCSS ){
grunt.file.delete( tmp );
done();
} else {

0 comments on commit 8cbffa1

Please sign in to comment.