Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

edp-build-url-embed

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

edp-build-url-embed

Embed URL's as base64 strings inside your stylesheets using edp build

  • 0.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

edp-build-url-embed

Embed URL's as base64 strings inside your stylesheets using edp build

Install

npm install edp-build-url-embed --save-dev

Usage

Add code in edp-build-config.js

var UrlEmbededProcessor = require('edp-build-url-embed');
var urlEmbed = new UrlEmbededProcessor();

Options

inclusive

Type: Boolean

Default: false

Specifies the mode of embedding.

  • true (inclusive) means that you have to manually mark each URL that needs to be embedded using the /* embed */ comment.
  • false (exclusive) means that every URL is embedded, except those that are marked with /* noembed */ comment.

extensions

Type: Array

Default: ['.jpg', '.png']

Specifies the extensions of urls to be embed.

files

Type: Array

Default: ['*.styl', '*.css', '*.less']

Input files.

Excluding URLs manually (when inclusive: false)

.exclude-me {
    background-image: url('exclude_me.png'); /* noembed */
}

Including URLs manually (when inclusive: true)

.include-me {
    background-image: url('include_me.png'); /* embed */
}

When URLs are in the middle of CSS property

.include-me1 {
    background: transparent url('include_me.png') /* embed */ center center no-repeat;
}

.include-me2 {
    background-image: -webkit-image-set(url('include_me1.png') /* embed */ 1x, url('include_me2.png') /* embed */ 2x);
}

Keywords

FAQs

Package last updated on 30 Dec 2015

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