gulp-css-str2base64
Gulp plugin. Adds a function str2base64, which convert a normal string to base64 string.
Table of Contents
Install
npm install --save-dev gulp-css-str2base64
Options
-
debug
(Boolean)Option log to console. In debug mode will be displayed warning failed string conversion to base64 string. This option is disabled by default.
Enabling debug mode:
......
Example usage
This example shows how to automatically convert string to base64 string.
gulpfile.js
var gulp = ;var str2base64 = ; gulp;
Contents of file "./static/css/main.css"
/* Example of inserting image */
Result contents of file "./static/cache/main.css"
/* Example of inserting image */
How to use with sass?
gulpfile.js
var gulp = ;var str2base64 = ; gulp;