Skip to content
This repository was archived by the owner on Sep 5, 2022. It is now read-only.

Commit 145d6ca

Browse files
author
Mehdy Dara
committed
Merge pull request #19 from zckrs/update-readme
Add badge
2 parents 115cd54 + 0a1a2a1 commit 145d6ca

File tree

3 files changed

+20
-11
lines changed

3 files changed

+20
-11
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
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)
25

36
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.
47

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "gulp-css-base64",
33
"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",
55
"homepage": "http://github.com/zckrs/gulp-css-base64",
66
"repository": {
77
"type": "git",
@@ -24,20 +24,20 @@
2424
],
2525
"dependencies": {
2626
"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",
3030
"buffers": "~0.1.1",
31-
"chalk": "~0.4.0",
31+
"chalk": "~0.5.1",
3232
"dateformat": "~1.0.8-1.2.3",
33-
"vinyl": "~0.2.3"
33+
"vinyl": "~0.3.2"
3434
},
3535
"devDependencies": {
36-
"mocha": "~1.18.2",
36+
"mocha": "~1.21.4",
3737
"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"
4141
},
4242
"scripts": {
4343
"test": "mocha --reporter spec",

src/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
var fs = require('fs');
55
var path = require('path');
66
var mime = require('mime');
7+
var util = require('util');
78
var Stream = require('stream').Stream;
89

910
// NPM library
@@ -24,6 +25,11 @@ function gulpCssBase64(opts) {
2425
opts = opts || {};
2526
opts.deleteAfterEncoding = opts.deleteAfterEncoding || false;
2627
opts.maxWeightResource = opts.maxWeightResource || 32768;
28+
if (util.isArray(opts.extensionsAllowed)) {
29+
opts.extensionsAllowed = opts.extensionsAllowed;
30+
} else {
31+
opts.extensionsAllowed = [];
32+
}
2733
opts.extensionsAllowed = opts.extensionsAllowed || [];
2834
opts.baseDir = opts.baseDir || '';
2935
opts.preProcess = opts.preProcess || '';

0 commit comments

Comments
 (0)