@@ -75,7 +75,6 @@ function plugin(opts) {
7575
7676 // Plugin initializer.
7777 return function ( css ) {
78- Q . longStackSupport = true ;
7978 return Q
8079 . all ( [ getImages ( css , options ) , options ] )
8180 . spread ( applyFilterBy )
@@ -89,11 +88,11 @@ function plugin(opts) {
8988 . spread ( preloadTemplates )
9089 . spread ( saveExternalStyle )
9190 . then ( function ( ) {
92- log ( 'Done.' ) ;
91+ log ( 'Done.' , options . verbose ) ;
9392 } )
9493 . catch ( function ( err ) {
9594 if ( err ) {
96- log ( 'Error: ' + err ) ;
95+ log ( 'Error: ' + err , options . verbose ) ;
9796 }
9897 } ) ;
9998 }
@@ -183,7 +182,7 @@ function getImages(css, opts) {
183182
184183 images . push ( image ) ;
185184 } else {
186- log ( 'Skip ' + image . url + ' - not supported.' ) ;
185+ log ( 'Skip ' + image . url + ' - not supported.' , opts . verbose ) ;
187186 }
188187 }
189188 } ) ;
@@ -217,7 +216,7 @@ function setupFilterBy(opts) {
217216 return Q . Promise ( function ( resolve , reject ) {
218217 fs . exists ( image . path , function ( exists ) {
219218 if ( ! exists ) {
220- log ( 'Skip ' + image . url + ' - not exist.' ) ;
219+ log ( 'Skip ' + image . url + ' - not exist.' , opts . verbose ) ;
221220 }
222221
223222 resolve ( exists ) ;
@@ -388,7 +387,7 @@ function saveSprites(images, opts, sprites) {
388387
389388 return Q . nfcall ( fs . writeFile , sprite . path , new Buffer ( sprite . image , 'binary' ) )
390389 . then ( function ( ) {
391- log ( util . format ( 'Spritesheet %s generated.' , sprite . path ) ) ;
390+ log ( util . format ( 'Spritesheet %s generated.' , sprite . path ) , opts . verbose ) ;
392391
393392 return sprite ;
394393 } ) ;
@@ -544,7 +543,7 @@ function saveExternalStyle(images, opts, templates) {
544543 }
545544
546545 if ( ! images . length ) {
547- log ( 'Skip external stylesheet, because there is no images.' ) ;
546+ log ( 'Skip external stylesheet, because there is no images.' , opts . verbose ) ;
548547 return Q ( [ images , opts , templates ] ) ;
549548 }
550549
@@ -589,7 +588,7 @@ function saveExternalStyle(images, opts, templates) {
589588
590589 Q . nfcall ( fs . writeFile , opts . externalStyle , css )
591590 . then ( function ( ) {
592- log ( util . format ( 'External stylsheet %s generated.' , path . basename ( opts . externalStyle ) ) ) ;
591+ log ( util . format ( 'External stylsheet %s generated.' , path . basename ( opts . externalStyle ) ) , opts . verbose ) ;
593592
594593 resolve ( ) ;
595594 } ) ;
0 commit comments