dg-sprity-sass

1.0.1 • Public • Published

dg-sprity-sass

This is a fork of sprity-sass


Requirements

Install

Install with npm

npm install sprity dg-sprity-sass --save

If you want to use sprity-sass with the command line interface of sprity install it globally.

npm install sprity dg-sprity-sass -g

Options

  • style-type: Eighter scss or sass. Defaults to scss.

Usage

On commandline:

sprity out/ src/*.png -s style.scss -p sass --style-type scss

In JavaScript:

var sprite = require('sprity');
sprite.create({
  ...
  style: 'style.scss',
  processor: 'sass'
  'style-type': 'scss'
  ...
}, function () {
  console.log('done');
});

scss usage example

@import 'sprite'; // the generated style file (sprite.scss) 
 
// camera icon (camera.png in src directory) 
.icon-camera {
  @include sprite($camera);
}
 
// cart icon (cart.png in src directory) 
.icon-cart {
  @include sprite($cart);
}

sass usage example

@import 'sprite' // the generated style file (sprite.sass)
 
// 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

Package Sidebar

Install

npm i dg-sprity-sass

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • bbriatte