1.0.3 • Published 4 years ago

gulp-base64-favicon v1.0.3

Weekly downloads
37
License
MIT
Repository
github
Last release
4 years ago

gulp-base64-favicon npm version Dependency Status license Codacy Badge

Install

With npm do:

npm install gulp-base64-favicon --save-dev

Example

<head>
  <meta charset="utf-8">
  <!-- shortcut::favicon.png -->
  <link rel="stylesheet" href="style.css">
  ...
</head>  
var gulp = require('gulp');
var favicon = require('gulp-base64-favicon');

gulp.task('default', function() {
    return gulp.src('./index.html') 
        .pipe(favicon())
        .pipe(gulp.dest('./out'));
});

In the output directory you will find your index.html with the following content:

<head>
  <meta charset="utf-8">
  <link rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUh...sAAAAAElFTkSuQmCC"/>
  <link rel="stylesheet" href="style.css">
  ...
</head>  

API

favicon(src)

src

Type: String

Path to the source directory.

favicon(obj)

obj

Type: Object

Container for data.

obj.src

Type: String

Path to the source directory.

License

MIT © Makarian Vladyslav