Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
css-sprite
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Toolchain
css-sprite
Commits
e598d8cc
Commit
e598d8cc
authored
10 years ago
by
Alexander Slansky
Browse files
Options
Downloads
Plain Diff
Merge pull request #19 from shinnn/master
Update readme
parents
c1f3ee20
987d5ac2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
readme.md
+11
-11
11 additions, 11 deletions
readme.md
with
11 additions
and
11 deletions
readme.md
+
11
−
11
View file @
e598d8cc
# css-sprite
[

](http://badge.fury.io/js/css-sprite)
[

](https://travis-ci.org/aslansky/css-sprite)
[

](https://coveralls.io/r/aslansky/css-sprite)
[

](https://david-dm.org/aslansky/css-sprite)
[

](http://badge.fury.io/js/css-sprite)
[

](https://travis-ci.org/aslansky/css-sprite)
[

](https://coveralls.io/r/aslansky/css-sprite)
[

](https://david-dm.org/aslansky/css-sprite)
> A css sprite generator.
...
...
@@ -12,9 +12,9 @@
## Requirements
`css-sprite`
requires
[
node-canvas
](
https://github.com/
learnboost
/node-canvas
)
which depends on
[
Cairo
](
http://cairographics.org/
)
.
`css-sprite`
requires
[
node-canvas
](
https://github.com/
Automattic
/node-canvas
)
which depends on
[
Cairo
](
http://cairographics.org/
)
.
Please refer to the
[
installation guide
](
https://github.com/
learnboost
/node-canvas/wiki
)
.
Please refer to the
[
installation guide
](
https://github.com/
Automattic
/node-canvas/wiki
)
.
## Install
...
...
@@ -32,7 +32,7 @@ npm install css-sprite -g
## Command Line Interface
```
```
sh
Usage: css-sprite <out> <src>...
[
options]
out path of directory to write sprite file to
...
...
@@ -74,7 +74,7 @@ sprite.create(options, cb);
### Example
```
```
js
var
sprite
=
require
(
'
css-sprite
'
);
sprite
.
create
({
src
:
[
'
./src/img/*.png
'
],
...
...
@@ -89,7 +89,7 @@ sprite.create({
```
## Usage with [Gulp](http://gulpjs.com)
```
```
js
var
gulp
=
require
(
'
gulp
'
);
var
gulpif
=
require
(
'
gulp-if
'
);
var
sprite
=
require
(
'
css-sprite
'
).
stream
;
...
...
@@ -123,7 +123,7 @@ Options to use `css-sprite` with [Gulp](http://gulpjs.com) are the same as for t
Add
`css-sprite`
as a dependency to your grunt project and then use something like this in your
`gruntfile.js`
:
```
```
js
module
.
exports
=
function
(
grunt
)
{
// Project configuration.
...
...
@@ -167,7 +167,7 @@ Options to use `css-sprite` with [Grunt](http://gruntjs.com) are the same as for
#### [scss](http://sass-lang.com/) example
```
```
scss
@import
'sprite'
;
// the generated style file (sprite.scss)
// camera icon (camera.png in src directory)
...
...
@@ -183,7 +183,7 @@ Options to use `css-sprite` with [Grunt](http://gruntjs.com) are the same as for
#### [sass](http://sass-lang.com/) example
```
```
sass
@import
'sprite'
//
the
generated
style
file
(sprite.sass)
// camera icon (camera.png in src directory)
...
...
@@ -197,7 +197,7 @@ Options to use `css-sprite` with [Grunt](http://gruntjs.com) are the same as for
#### [less](http://lesscss.org/) example
```
```
less
@import 'sprite'; // the generated style file (sprite.less)
// camera icon (camera.png in src directory)
...
...
@@ -213,7 +213,7 @@ Options to use `css-sprite` with [Grunt](http://gruntjs.com) are the same as for
#### [stylus](http://learnboost.github.io/stylus/) example
```
```
stylus
@import 'sprite' // the generated style file (sprite.styl)
// camera icon (camera.png in src directory)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment