New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fis-spriter-csssprites

Package Overview
Dependencies
Maintainers
2
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fis-spriter-csssprites - npm Package Compare versions

Comparing version 0.1.9 to 0.2.2

30

libs/image.js

@@ -20,4 +20,5 @@ /*

'height_limit': 10240,
'layout': 'linear'
}
'layout': 'linear',
'ie_bug_fix': true
};

@@ -95,4 +96,25 @@

this.ret.pkg[this.file.subpathNoExt + ext] = image_file;
this.css += arr_selector.join(',')
+ '{background-image: url(' + image_file.getUrl(this.opt.hash, this.opt.domain) + image_file.hash + ')}';
function unique(arr) {
var map = {};
return arr.filter(function(item){
return map.hasOwnProperty(item) ? false : map[item] = true;
});
}
if (this.settings.ie_bug_fix) {
var MAX = this.settings.max_selectores || 30; //max 36
var arr_selector = unique(arr_selector.join(',').split(','));
var len = arr_selector.length;
var n = Math.ceil(len / MAX);
for (var i = 0; i < n; i++) {
var step = i * MAX
this.css += arr_selector.slice(step, step + MAX).join(',')
+ '{background-image: url(' + image_file.getUrl(this.opt.hash, this.opt.domain) + image_file.hash + ')}';
}
} else {
this.css += unique(arr_selector.join(',').split(',')).join(',')
+ '{background-image: url(' + image_file.getUrl(this.opt.hash, this.opt.domain) + image_file.hash + ')}';
}
},

@@ -99,0 +121,0 @@ z_pack: require('./pack.js'),

4

package.json
{
"name": "fis-spriter-csssprites",
"version": "0.1.9",
"version": "0.2.2",
"description": "基于fis的csssprite,支持repeat-x,repeat-x,background-position",

@@ -17,3 +17,3 @@ "main": "index.js",

"dependencies": {
"node-images": "1.5.5"
"node-images": "1.5.5"
},

@@ -20,0 +20,0 @@ "keywords": [

@@ -14,3 +14,3 @@ ## fis-spriter-csssprites

0. 依赖native插件,[node-images](https://github.com/fex-team/node-images) 环境需要符合个插件的要求。(OS X、Windows、Linux x86 提供了二进制包)
0. 依赖native插件,[node-images](https://github.com/xiangshouding/node-images) 环境需要符合个插件的要求。(OS X、Windows、Linux x86 提供了二进制包)
0. 只能在FIS中使用

@@ -17,0 +17,0 @@

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