assetgraph-sprite
Advanced tools
Comparing version 0.7.0 to 0.7.1
@@ -138,2 +138,4 @@ var URL = require('url'), | ||
var redefinitionErrors = {}; | ||
// Extract sprite grouping information va -sprite- prefixed properties in stylesheets | ||
@@ -170,7 +172,8 @@ assetGraph.findAssets({type: 'Css'}).forEach(function (cssAsset) { | ||
})) { | ||
err = new Error('assetgraph-sprite: Multiple identical definitions of ' + spriteGroupName + ' sprite.\nThis might happen if you duplicate CSS using a preprocessor.'); | ||
err.asset = cssAsset; | ||
// Queue up these errors as they tend to come in quite big bunches | ||
if (!Array.isArray(redefinitionErrors[spriteGroupName])) { | ||
redefinitionErrors[spriteGroupName] = []; | ||
} | ||
redefinitionErrors[spriteGroupName].push(cssAsset); | ||
assetGraph.emit('info', err); | ||
group.placeHolders.push(_.extend(spriteInfo, { | ||
@@ -199,2 +202,16 @@ asset: cssAsset, | ||
Object.keys(redefinitionErrors).forEach(function (spriteGroupName) { | ||
var message = [ | ||
'assetgraph-sprite: Multiple identical definitions of ' + spriteGroupName + ' sprite.', | ||
'This might happen if you duplicate CSS using a preprocessor.', | ||
redefinitionErrors[spriteGroupName].map(function (asset) { | ||
return '\t' + asset.urlOrDescription; | ||
}).join('\n') | ||
].join('\n'); | ||
var err = new Error(message); | ||
assetGraph.emit('info', err); | ||
}); | ||
seq(Object.keys(spriteGroups)) | ||
@@ -201,0 +218,0 @@ .seqEach(function (spriteGroupName) { |
@@ -5,3 +5,3 @@ { | ||
"repository": "git://github.com/One-com/assetgraph-sprite.git", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"maintainers": [ | ||
@@ -8,0 +8,0 @@ { |
@@ -5,6 +5,6 @@ AssetGraph-sprite | ||
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/assetgraph/assetgraph-sprite?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
[![NPM version](https://badge.fury.io/js/assetgraph-sprite.png)](http://badge.fury.io/js/assetgraph-sprite) | ||
[![Build Status](https://travis-ci.org/assetgraph/assetgraph-sprite.png?branch=master)](https://travis-ci.org/assetgraph/assetgraph-sprite) | ||
[![Dependency Status](https://david-dm.org/assetgraph/assetgraph-sprite.png)](https://david-dm.org/assetgraph/assetgraph-sprite) | ||
[![Coverage Status](https://coveralls.io/repos/assetgraph/assetgraph-sprite/badge.png)](https://coveralls.io/r/assetgraph/assetgraph-sprite) | ||
[![NPM version](https://badge.fury.io/js/assetgraph-sprite.svg)](http://badge.fury.io/js/assetgraph-sprite) | ||
[![Build Status](https://travis-ci.org/assetgraph/assetgraph-sprite.svg?branch=master)](https://travis-ci.org/assetgraph/assetgraph-sprite) | ||
[![Coverage Status](https://coveralls.io/repos/assetgraph/assetgraph-sprite/badge.svg?style=flat)](https://coveralls.io/r/assetgraph/assetgraph-sprite) | ||
[![Dependency Status](https://david-dm.org/assetgraph/assetgraph-sprite.svg)](https://david-dm.org/assetgraph/assetgraph-sprite) | ||
@@ -11,0 +11,0 @@ A plugin (or "transform") for <a |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
550
37866
8
1