1.0.8 • Published 9 years ago
sprity-customless v1.0.8
sprity-customless
A less custom style processor for sprity sprity This is a copy and modify of Alexander Slansky module - alexander@slansky.net - alexander@slansky.net
Requirements
- sprity version >= 1.0
Install
Install with npm
npm install sprity sprity-customless --saveIf you want to use sprity-less with the command line interface of sprity install it globally.
npm install sprity sprity-customless -gUsage
On commandline:
sprity out/ src/*.png -s style.less -p lessIn JavaScript:
var sprite = require('sprity');
sprite.create({
...
style: 'style.less',
processor: 'customless'
...
}, function () {
console.log('done');
});less usage example
@import 'sprite'; // the generated style file (sprite.less)
// camera icon (camera.png in src directory)
.icon-camera {
.sprite(@camera);
}
// cart icon (cart.png in src directory)
.icon-cart {
.sprite(@cart);
}More
See sprity documentation