This repository was archived by the owner on Sep 5, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +20
-11
lines changed Expand file tree Collapse file tree 3 files changed +20
-11
lines changed Original file line number Diff line number Diff line change 1
- # gulp-css-base64 [ ![ Build Status] ( https://travis-ci.org/zckrs/gulp-css-base64.svg?branch=master )] ( https://travis-ci.org/zckrs/gulp-css-base64 ) [ ![ Coverage Status] ( https://coveralls.io/repos/zckrs/gulp-css-base64/badge.png?branch=master )] ( https://coveralls.io/r/zckrs/gulp-css-base64?branch=master )
1
+ # gulp-css-base64
2
+
3
+ [ ![ Build Status] ( http://img.shields.io/travis/zckrs/gulp-css-base64.svg?style=flat )] ( https://travis-ci.org/zckrs/gulp-css-base64 ) [ ![ Coverage Status] ( http://img.shields.io/coveralls/zckrs/gulp-css-base64.svg?style=flat )] ( https://coveralls.io/r/zckrs/gulp-css-base64?branch=master )
4
+ [ ![ Dependencies] ( http://img.shields.io/david/zckrs/gulp-css-base64.svg?style=flat )] ( https://david-dm.org/zckrs/gulp-css-base64 ) [ ![ NPM Version] ( http://img.shields.io/npm/v/gulp-css-base64.svg?style=flat )] ( https://www.npmjs.org/package/gulp-css-base64 ) [ ![ Download Month] ( http://img.shields.io/npm/dm/gulp-css-base64.svg?style=flat )] ( https://www.npmjs.org/package/gulp-css-base64 )
2
5
3
6
This gulp task converts all data found within a stylesheet (those within a url( ... ) declaration) into base64-encoded data URI strings. This includes images and fonts.
4
7
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " gulp-css-base64" ,
3
3
"description" : " Gulp's task for transform all resources found in a CSS into base64-encoded data URI strings" ,
4
- "version" : " 1.2.4 " ,
4
+ "version" : " 1.2.5 " ,
5
5
"homepage" : " http://github.com/zckrs/gulp-css-base64" ,
6
6
"repository" : {
7
7
"type" : " git" ,
24
24
],
25
25
"dependencies" : {
26
26
"mime" : " ~1.2.11" ,
27
- "through2" : " ~0.4.1 " ,
28
- "async" : " ~0.8 .0" ,
29
- "request" : " ~2.34 .0" ,
27
+ "through2" : " ~0.6.0 " ,
28
+ "async" : " ~0.9 .0" ,
29
+ "request" : " ~2.40 .0" ,
30
30
"buffers" : " ~0.1.1" ,
31
- "chalk" : " ~0.4.0 " ,
31
+ "chalk" : " ~0.5.1 " ,
32
32
"dateformat" : " ~1.0.8-1.2.3" ,
33
- "vinyl" : " ~0.2.3 "
33
+ "vinyl" : " ~0.3.2 "
34
34
},
35
35
"devDependencies" : {
36
- "mocha" : " ~1.18.2 " ,
36
+ "mocha" : " ~1.21.4 " ,
37
37
"mocha-lcov-reporter" : " 0.0.1" ,
38
- "coveralls" : " ~2.10.0 " ,
39
- "event-stream" : " ~3.1.2 " ,
40
- "istanbul" : " ~0.2.7 "
38
+ "coveralls" : " ~2.11.1 " ,
39
+ "event-stream" : " ~3.1.7 " ,
40
+ "istanbul" : " ~0.3.0 "
41
41
},
42
42
"scripts" : {
43
43
"test" : " mocha --reporter spec" ,
Original file line number Diff line number Diff line change 4
4
var fs = require ( 'fs' ) ;
5
5
var path = require ( 'path' ) ;
6
6
var mime = require ( 'mime' ) ;
7
+ var util = require ( 'util' ) ;
7
8
var Stream = require ( 'stream' ) . Stream ;
8
9
9
10
// NPM library
@@ -24,6 +25,11 @@ function gulpCssBase64(opts) {
24
25
opts = opts || { } ;
25
26
opts . deleteAfterEncoding = opts . deleteAfterEncoding || false ;
26
27
opts . maxWeightResource = opts . maxWeightResource || 32768 ;
28
+ if ( util . isArray ( opts . extensionsAllowed ) ) {
29
+ opts . extensionsAllowed = opts . extensionsAllowed ;
30
+ } else {
31
+ opts . extensionsAllowed = [ ] ;
32
+ }
27
33
opts . extensionsAllowed = opts . extensionsAllowed || [ ] ;
28
34
opts . baseDir = opts . baseDir || '' ;
29
35
opts . preProcess = opts . preProcess || '' ;
You can’t perform that action at this time.
0 commit comments