Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/syuji-higa/gulp-stylus-sprites
Sprite image Gulp plugin for Stylus.
https://github.com/syuji-higa/gulp-stylus-sprites
gulp javascript
Last synced: 2 days ago
JSON representation
Sprite image Gulp plugin for Stylus.
- Host: GitHub
- URL: https://github.com/syuji-higa/gulp-stylus-sprites
- Owner: syuji-higa
- License: mit
- Created: 2014-10-29T05:57:18.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-03-02T08:49:52.000Z (almost 8 years ago)
- Last Synced: 2024-04-14T08:34:33.531Z (10 months ago)
- Topics: gulp, javascript
- Language: JavaScript
- Homepage:
- Size: 70.3 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
gulp-stylus-sprites
===============```
import gulp from 'gulp';
import filter from 'gulp-filter';
import stylusSprites from 'gulp-stylus-sprites';gulp.task('sprite', () => {
const _imageDest = 'htdocs';
const _pngFilter = filter(['**/*.png'], { restore: true });
const _stylFilter = filter(['**/*.styl'], { restore: true });gulp.src('./sprite/**/*.png')
.pipe(stylusSprites, {
imagesSrcBase: `${ __dirname }/sprite`,
})
.pipe(_pngFilter)
.pipe(gulp.dest(_imageDest))
.pipe(_pngFilter.restore)
.pipe(_stylFilter)
.pipe(cache('stylus'))
.pipe(gulp.dest(SPRITE_CSS_DEST))
.pipe(_stylFilter.restore);
});
```