Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

assetgraph-sprite

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

assetgraph-sprite - npm Package Compare versions

Comparing version 0.2.12 to 0.3.0

12

lib/transforms/spriteBackgroundImages.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc