New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gulp-dataurl

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-dataurl

A gulp plugin that converts matched file paths into base64-encoded data URI strings.

  • 1.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-80%
Maintainers
1
Weekly downloads
 
Created
Source

gulp-dataurl

version Codecov release

A gulp plugin that converts matched file paths into base64-encoded data URI strings.

一个 gulp 插件,用于将匹配到的文件路径转换为 base64 编码的 data URI 字符串。

features

  • ☁️ Support for remote files
  • 🪝 Customizable file type extensions
  • 🚦 Inclusion/exclusion rulesets for selective file encoding
  • 🚧 File size limits to prevent overly large Data URLs
  • 🚀 Cache duplicate processed files

Usage

Install with npm

npm install -D gulp-dataurl

gulp task:

const gulp = require('gulp');
const dataurl = require('gulp-dataurl');

gulp.task('html', function() {
  return gulp.src('src/**/*.html')
    .pipe(dataurl({
      remote: true,
      extensions: ['.png', '.gif', '.svg'],
      include: /\?inline$/i,
      exclude: 'node_modules',
      limit: 2048 //2kb
    }))
    .pipe(gulp.dest('dist')); 
});

Options

remote
  • Type: boolean
  • Default: false

Whether remote files are supported.

extensions
  • Type: string | string[]

Supported extensions.

include
  • Type: string | string[] | RegExp | RegExp[]

Matching rule patterns.

exclude
  • Type: string | string[] | RegExp | RegExp[]

Exclusion rule patterns.

limit
  • Type: number
  • Default: 4096

File Size Limit.

Keywords

FAQs

Package last updated on 27 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc