assetgraph-sprite
Advanced tools
Comparing version 0.2.12 to 0.3.0
@@ -90,3 +90,3 @@ var _ = require('underscore'), | ||
assetGraph.findRelations({type: 'CssImage'}).forEach(function (relation) { | ||
var spriteInfo = AssetGraph.assets.Css.extractInfoFromRule(relation.cssRule, vendorPrefix + '-sprite-'), | ||
var spriteInfo = AssetGraph.assets.Css.extractInfoFromRule(relation.cssRule, vendorPrefix + 'sprite-'), | ||
asset = relation.to; | ||
@@ -122,4 +122,4 @@ if (spriteInfo.group) { | ||
} | ||
if ((vendorPrefix + '-sprite-selector-for-group') in cssRule.style) { | ||
var spriteInfo = AssetGraph.assets.Css.extractInfoFromRule(cssRule, vendorPrefix + '-sprite-'), | ||
if ((vendorPrefix + 'sprite-selector-for-group') in cssRule.style) { | ||
var spriteInfo = AssetGraph.assets.Css.extractInfoFromRule(cssRule, vendorPrefix + 'sprite-'), | ||
spriteGroupName = spriteInfo.selectorForGroup; | ||
@@ -193,3 +193,3 @@ if (spriteGroupName in spriteGroups) { | ||
['selector-for-group', 'packer', 'image-format', 'background-color', 'important'].forEach(function (propertyName) { | ||
spriteGroup.placeHolder.cssRule.style.removeProperty(vendorPrefix + '-sprite-' + propertyName); | ||
spriteGroup.placeHolder.cssRule.style.removeProperty(vendorPrefix + 'sprite-' + propertyName); | ||
}); | ||
@@ -200,3 +200,3 @@ } | ||
incomingRelation.from.markDirty(); | ||
var relationSpriteInfo = AssetGraph.assets.Css.extractInfoFromRule(incomingRelation.cssRule, vendorPrefix + '-sprite-'), | ||
var relationSpriteInfo = AssetGraph.assets.Css.extractInfoFromRule(incomingRelation.cssRule, vendorPrefix + 'sprite-'), | ||
offsets = [ | ||
@@ -232,3 +232,3 @@ imageInfo.x, | ||
['group', 'padding', 'no-group-selector', 'important'].forEach(function (propertyName) { | ||
incomingRelation.cssRule.style.removeProperty(vendorPrefix + '-sprite-' + propertyName); | ||
incomingRelation.cssRule.style.removeProperty(vendorPrefix + 'sprite-' + propertyName); | ||
}); | ||
@@ -235,0 +235,0 @@ if (relationSpriteInfo.noGroupSelector || !spriteGroup.placeHolder) { |
@@ -5,3 +5,3 @@ { | ||
"repository": "git://github.com/One-com/assetgraph-sprite.git", | ||
"version": "0.2.12", | ||
"version": "0.3.0", | ||
"maintainers": [ | ||
@@ -8,0 +8,0 @@ { |
@@ -35,3 +35,3 @@ var vows = require('vows'), | ||
}, | ||
'After loading the same test case again, set the -one-sprite-image-format to jpg and sprite the background images': { | ||
'After loading the same test case again, set the -ag-sprite-image-format to jpg and sprite the background images': { | ||
topic: function () { | ||
@@ -43,3 +43,3 @@ new AssetGraph({root: __dirname + '/spriteBackgroundImages/simple/'}).queue( | ||
var cssAsset = assetGraph.findAssets({type: 'Css'})[0]; | ||
cssAsset.parseTree.cssRules[0].style.setProperty('-one-sprite-image-format', 'jpg'); | ||
cssAsset.parseTree.cssRules[0].style.setProperty('-ag-sprite-image-format', 'jpg'); | ||
cssAsset.markDirty(); | ||
@@ -46,0 +46,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
34307