<commit_before># spritestream

spritestream reads from a stream of retina and non-retina image files and spits
out sprite sheets and an accompanying CSS file. It is designed for use with
[Gulp][gulp].

## Usage

Pipe your source files into `spritestream`, and provide a callback. The callback
will receive either an error or an array of results with the non-retina sprite
image, the retina sprite image, and the CSS file, in that order.

spritestream assumes that for each `image.png`, there is an accompanying
`image@2x.png` for use in the retina sprite sheet.

```javascript
var es           = require('event-stream');
var gulp         = require('gulp');
var spritestream = require('spritestream');

gulp.src('./images/**/*.png').pipe(spritestream(function(err, results) {
  if (err) { throw err; }
  es.readArray(results).pipe(gulp.dest('./public'));
}));
```

## Options

### `digest`

Append an md5 hash of the file contents to the end of its name

### `imagesPath`

The path, relative to the ultimate pipe destination, to attach to the image
Vinyl file objects.

### `cssPath`

The path, relative to the ultimate pipe destination, to attach to the css Vinyl
file objects.

### Example

This example will result in the following files:

- `./public/images/sprites-34509438543098abcde.png`
- `./public/images/sprites-234098234098234908a@2x.png`
- `./public/stylesheets/sprites-styles-2340823049823094098.css`

```javascript
gulp.src('./images/**/*.png').pipe(spritestream({
  digest    : true,
  imagesPath: './images/sprites',
  cssPath   : './stylesheets/sprites-styles'
}, function(err, results) {
  es.readArray(results).pipe(gulp.dest('./public'));
});
```

## Installation

```sh
npm install spritestream --save
```

## Tests

Automated tests:

```sh
npm test
```

Manual tests:

```sh
npm run test-server
```

## Credits

The icons used in the test suite—"Watch", "Breakfast", "Sketchbook", and
"Twinkie"—were designed by [<NAME>][boatman] from
[thenounproject.com][nounproject].

[boatman]: http://www.thenounproject.com/edward
[gulp]: https://gulpjs.org
[nounproject]: http://www.thenounproject.com/<commit_msg>update gulp.js link<commit_after># spritestream

spritestream reads from a stream of retina and non-retina image files and spits
out sprite sheets and an accompanying CSS file. It is designed for use with
[Gulp][gulp].

## Usage

Pipe your source files into `spritestream`, and provide a callback. The callback
will receive either an error or an array of results with the non-retina sprite
image, the retina sprite image, and the CSS file, in that order.

spritestream assumes that for each `image.png`, there is an accompanying
`image@2x.png` for use in the retina sprite sheet.

```javascript
var es           = require('event-stream');
var gulp         = require('gulp');
var spritestream = require('spritestream');

gulp.src('./images/**/*.png').pipe(spritestream(function(err, results) {
  if (err) { throw err; }
  es.readArray(results).pipe(gulp.dest('./public'));
}));
```

## Options

### `digest`

Append an md5 hash of the file contents to the end of its name

### `imagesPath`

The path, relative to the ultimate pipe destination, to attach to the image
Vinyl file objects.

### `cssPath`

The path, relative to the ultimate pipe destination, to attach to the css Vinyl
file objects.

### Example

This example will result in the following files:

- `./public/images/sprites-34509438543098abcde.png`
- `./public/images/sprites-234098234098234908a@2x.png`
- `./public/stylesheets/sprites-styles-2340823049823094098.css`

```javascript
gulp.src('./images/**/*.png').pipe(spritestream({
  digest    : true,
  imagesPath: './images/sprites',
  cssPath   : './stylesheets/sprites-styles'
}, function(err, results) {
  es.readArray(results).pipe(gulp.dest('./public'));
});
```

## Installation

```sh
npm install spritestream --save
```

## Tests

Automated tests:

```sh
npm test
```

Manual tests:

```sh
npm run test-server
```

## Credits

The icons used in the test suite—"Watch", "Breakfast", "Sketchbook", and
"Twinkie"—were designed by [<NAME>][boatman] from
[thenounproject.com][nounproject].

[boatman]: http://www.thenounproject.com/edward
[gulp]: http://gulpjs.com
[nounproject]: http://www.thenounproject.com/
{'fraction_non_alphanumeric': 0.13943098988948976, 'fraction_numerical': 0.02539383964260522, 'mean_word_length': 4.412213740458015, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4055917', 'n_tokens_mistral': 1476, 'n_tokens_neox': 1365, 'n_words': 437}