spritesheet-templates
Advanced tools
Comparing version 9.0.1 to 9.1.0
# spritesheet-templates changelog | ||
9.1.0 - Added explicit list syntax for SASS/SCSS and notes for single-sprite spritesheets in LESS/Stylus | ||
9.0.1 - Refactored test suite to make it more transparent | ||
@@ -3,0 +5,0 @@ |
{ | ||
"name": "spritesheet-templates", | ||
"description": "Convert spritesheet data into CSS or CSS pre-processor data", | ||
"version": "9.0.1", | ||
"version": "9.1.0", | ||
"homepage": "https://github.com/twolfson/spritesheet-templates", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -41,1 +41,25 @@ var assert = require('assert'); | ||
}); | ||
describe('An array of 1 image', function () { | ||
testUtils.setInfo(configUtils.singleItem); | ||
describe('processed by `spritesheet-templates` into SASS', function () { | ||
testUtils.runTemplater({format: 'sass'}); | ||
testUtils.assertOutputMatches(__dirname + '/expected_files/sass-single.sass'); | ||
testUtils.generateCssFile('\n' + [ | ||
'@include sprites($spritesheet-sprites)' | ||
].join('\n')); | ||
describe('processed by SASS into CSS', function () { | ||
testUtils.processCss(function processSass (cb) { | ||
exec('sass ' + this.tmp.path, function (err, css, stderr) { | ||
assert.strictEqual(stderr, ''); | ||
assert.notEqual(css, ''); | ||
cb(err, css); | ||
}); | ||
}); | ||
testUtils.assertValidCss(); | ||
}); | ||
}); | ||
}); |
@@ -43,1 +43,25 @@ var assert = require('assert'); | ||
}); | ||
describe('An array of 1 image', function () { | ||
testUtils.setInfo(configUtils.singleItem); | ||
describe('processed by `spritesheet-templates` into SASS', function () { | ||
testUtils.runTemplater({format: 'scss_maps'}); | ||
testUtils.assertOutputMatches(__dirname + '/expected_files/scss_maps-single.scss'); | ||
testUtils.generateCssFile('\n' + [ | ||
'@include sprites(map-get($spritesheet, \'sprites\'));' | ||
].join('\n')); | ||
describe('processed by SASS into CSS', function () { | ||
testUtils.processCss(function processScss (cb) { | ||
exec('sass --scss ' + this.tmp.path, function (err, css, stderr) { | ||
assert.strictEqual(stderr, ''); | ||
assert.notEqual(css, ''); | ||
cb(err, css); | ||
}); | ||
}); | ||
testUtils.assertValidCss(); | ||
}); | ||
}); | ||
}); |
@@ -55,1 +55,36 @@ var assert = require('assert'); | ||
}); | ||
describe('An array of 1 image', function () { | ||
testUtils.setInfo(configUtils.singleItem); | ||
describe('processed by `spritesheet-templates` into SCSS', function () { | ||
testUtils.runTemplater({format: 'scss'}); | ||
testUtils.assertOutputMatches(__dirname + '/expected_files/scss-single.scss'); | ||
testUtils.generateCssFile('\n' + [ | ||
'@include sprites($spritesheet-sprites);' | ||
].join('\n')); | ||
describe('processed by `sass --scss` (ruby) into CSS', function () { | ||
testUtils.processCss(function processScss (cb) { | ||
exec('sass --scss ' + this.tmp.path, function (err, css, stderr) { | ||
assert.strictEqual(stderr, ''); | ||
assert.notEqual(css, ''); | ||
cb(err, css); | ||
}); | ||
}); | ||
testUtils.assertValidCss(); | ||
}); | ||
describe('processed by `sassc` (libsass) into CSS', function () { | ||
testUtils.processCss(function processScss (cb) { | ||
exec('sassc ' + this.tmp.path, function (err, css, stderr) { | ||
assert.strictEqual(stderr, ''); | ||
assert.notEqual(css, ''); | ||
cb(err, css); | ||
}); | ||
}); | ||
testUtils.assertValidCss(); | ||
}); | ||
}); | ||
}); |
@@ -0,1 +1,10 @@ | ||
exports.singleItem = { | ||
items: [{ | ||
name: 'sprite-dash-case', x: 0, y: 0, width: 10, height: 20 | ||
}], | ||
spritesheet: { | ||
width: 10, height: 20, image: 'nested/dir/spritesheet.png' | ||
} | ||
}; | ||
exports.multipleItems = { | ||
@@ -2,0 +11,0 @@ items: [{ |
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
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
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
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
155901
59
1537