Socket
Socket
Sign inDemoInstall

grunt-node-sprite-mixings

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-node-sprite-mixings - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

2

package.json
{
"name": "grunt-node-sprite-mixings",
"description": "Generator mixings for stylus. Based on lib node-sprites",
"version": "0.1.5",
"version": "0.1.6",
"homepage": "https://github.com/SauloSilva/grunt-node-sprite-mixings",

@@ -6,0 +6,0 @@ "author": {

@@ -105,2 +105,4 @@ # grunt-node-sprite-mixings [![Build Status](https://travis-ci.org/SauloSilva/grunt-node-sprite-mixings.png?branch=master)](https://travis-ci.org/SauloSilva/grunt-node-sprite-mixings)

background url('urlNamespace/example-1.png') repeat (0px + x-offset) (442px + y-offset) transparent
width 20px
height 20px
```

@@ -129,2 +131,4 @@

background:url("urlNamespace/example-1.png") no-repeat 0 211px transparent;
width: 20px;
height: 20px
}

@@ -134,2 +138,4 @@

background:url("urlNamespace/example-1.png") no-repeat 2px 213px transparent;
width: 20px;
height: 20px
}

@@ -139,2 +145,4 @@

background:url("urlNamespace/example-1.png") repeat-x 0 211px transparent;
width: 20px;
height: 20px
}

@@ -155,2 +163,4 @@ ```

"name": "foo",
"width": 20px,
"height": 20px,
"positionX": 0,

@@ -160,2 +170,4 @@ "positionY": 0

"name": "bar",
"width": 30px,
"height": 30px,
"positionX": 0,

@@ -173,2 +185,3 @@ "positionY": 442

## Release History
* 2013-03-05 **v0.1.6** Improvements - add width and height of mixings
* 2013-03-05 **v0.1.5** Fix bug syntax background and insert namespace in the url

@@ -175,0 +188,0 @@ * 2013-03-05 **v0.1.4(deprecated)** Fix bug remove Json

@@ -79,3 +79,6 @@ /*

images.forEach(function(element, i) {
codes += element.name.replace('_', '-') + "(x-offset=0, y-offset=0, repeat=no-repeat)\n background url('" + url + "') repeat (" + element.positionX + "px + x-offset) (" + -element.positionY + "px + y-offset) transparent\n"
codes += element.name.replace('_', '-') + "(x-offset=0, y-offset=0, repeat=no-repeat)\n"
codes += " background url('" + url + "') repeat (" + element.positionX + "px + x-offset) (" + -element.positionY + "px + y-offset) transparent\n"
codes += " width " + element.width + "px\n"
codes += " height " + element.height + "px\n"
})

@@ -82,0 +85,0 @@ }

@@ -6,5 +6,7 @@ {

"name": "bar",
"width": 20,
"height": 20,
"positionX": 0,
"positionY": 442
"positionY": 300
}]
}

@@ -6,2 +6,4 @@ {

"name": "foo",
"width": 20,
"height": 20,
"positionX": 0,

@@ -11,2 +13,4 @@ "positionY": 0

"name": "bar",
"width": 20,
"height": 20,
"positionX": 0,

@@ -13,0 +17,0 @@ "positionY": 442

{
"name": "foo",
"shortsum": "1",
"images": [{
"name": "foo",
"width": 20,
"height": 20,
"positionX": 0,

@@ -8,0 +9,0 @@ "positionY": 0

@@ -9,3 +9,3 @@ 'use strict';

global: function(test) {
test.expect(19);
test.expect(33);
var pathStyl = './test/expected/global.styl',

@@ -18,13 +18,20 @@ pathJson = './test/fixtures/',

var jsonParsed = grunt.file.readJSON(pathJson + json)
test.equal(grunt.file.exists(pathStyl), true, 'Should file exist')
test.notEqual(globalStyl.indexOf(_.first(jsonParsed.images).name), -1, 'Should contain the name of mixing, the same json of the file');
test.notEqual(globalStyl.indexOf(_.last(jsonParsed.images).name), -1, 'Should contain the name of mixing, the same json of the file');
test.notEqual(globalStyl.indexOf('background'), -1, 'Should contain the background of mixing');
test.notEqual(globalStyl.indexOf("url('" + urlNamespace + jsonParsed.name + '-' + jsonParsed.shortsum + ".png')"), -1, 'Should contain the url of mixing');
jsonParsed.images.forEach(function(json) {
test.notEqual(globalStyl.indexOf(json.name), -1, 'Should contain the name of mixing, the same json of the file');
test.notEqual(globalStyl.indexOf(json.positionY), -1, 'Should contain the positionY of mixing, the same json of the file');
test.notEqual(globalStyl.indexOf(json.positionX), -1, 'Should contain the positionX of mixing, the same json of the file');
test.notEqual(globalStyl.indexOf(json.width), -1, 'Should contain the width of mixing, the same json of the file');
test.notEqual(globalStyl.indexOf(json.height), -1, 'Should contain the height of mixing, the same json of the file');
})
})
test.notEqual(globalStyl.indexOf('repeat'), -1, 'Should contain the repeat of mixing');
test.notEqual(globalStyl.indexOf('background'), -1, 'Should contain the background of mixing');
test.notEqual(globalStyl.indexOf('width'), -1, 'Should contain the width of mixing');
test.notEqual(globalStyl.indexOf('height'), -1, 'Should contain the width of mixing');
test.notEqual(globalStyl.indexOf('y-offset'), -1, 'Should contain the y-offset of mixing');
test.notEqual(globalStyl.indexOf('x-offset'), -1, 'Should contain the y-offset of mixing');
test.notEqual(globalStyl.indexOf('repeat'), -1, 'Should contain the repeat of mixing');
test.notEqual(globalStyl.indexOf('transparent'), -1, 'Should contain the transparent of mixing');

@@ -35,3 +42,3 @@ test.done();

basicAndExtra: function(test) {
test.expect(18);
test.expect(28);
var pathStyl = './test/expected/',

@@ -45,8 +52,15 @@ pathJson = './test/fixtures/',

test.notEqual(styl.indexOf(_.first(jsonParsed.images).name), -1, 'Should contain the name of mixing, the same json of the file');
test.notEqual(styl.indexOf(_.last(jsonParsed.images).name), -1, 'Should contain the name of mixing, the same json of the file');
test.notEqual(styl.indexOf('background'), -1, 'Should contain the background of mixing');
test.equal(grunt.file.exists(pathStyl + file + '.styl'), true, 'Should file exist')
test.notEqual(styl.indexOf("url('" + urlNamespace + jsonParsed.name + '-' + jsonParsed.shortsum + ".png')"), -1, 'Should contain the url of mixing');
jsonParsed.images.forEach(function(json) {
test.notEqual(styl.indexOf(json.name), -1, 'Should contain the name of mixing, the same json of the file');
test.notEqual(styl.indexOf(json.positionX), -1, 'Should contain the positionX of mixing, the same json of the file');
test.notEqual(styl.indexOf(json.positionY), -1, 'Should contain the positionY of mixing, the same json of the file');
test.notEqual(styl.indexOf(json.width), -1, 'Should contain the width of mixing, the same json of the file');
test.notEqual(styl.indexOf(json.height), -1, 'Should contain the height of mixing, the same json of the file');
test.equal(grunt.file.exists(pathStyl + file + '.styl'), true, 'Should file exist')
})
test.notEqual(styl.indexOf('background'), -1, 'Should contain the background of mixing');
test.notEqual(styl.indexOf('width'), -1, 'Should contain the width of mixing');
test.notEqual(styl.indexOf('height'), -1, 'Should contain the width of mixing');
test.notEqual(styl.indexOf('repeat'), -1, 'Should contain the repeat of mixing');

@@ -53,0 +67,0 @@ test.notEqual(styl.indexOf('y-offset'), -1, 'Should contain the y-offset of mixing');

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