Skip to content

Instantly share code, notes, and snippets.

@ayapi
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ayapi/9db5ea486061348f7e57 to your computer and use it in GitHub Desktop.
Save ayapi/9db5ea486061348f7e57 to your computer and use it in GitHub Desktop.
gulp-stylusでinline-image()
//gulp-stylus@1.0.0ばん
var gulp = require('gulp');
var stylus = require('gulp-stylus');
gulp.task('stylus', function () {
return gulp.src('./styl/style.styl')
.pipe(stylus({
url: {
//name:'url'とするとぜんぶのurl()がbase64埋め込みになる
//ぜんぶじゃなくて適宜指定したぃときにゎ
//このょーにして別の名前を用意する
name: 'inline-image',
paths: [__dirname + '/img'],
limit: false
}
}))
.pipe(gulp.dest('./css'))
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment