@yapplabs/broccoli-base64-css

0.0.6 • Public • Published

@yapplabs/broccoli-base64-css Build Status

Broccoli plugin to replace asset urls in CSS with base64 strings.

Installation

yarn add @yapplabs/broccoli-base64-css

Usage

let Base64CSS = require('broccoli-base64-css');
let outputNode = new Base64CSS(inputNode, {
  /* options */
});

Options

imagePath

Type: String
Default: "public"

The location to look to locate images referenced in the CSS files being updated.

fontPath

Type: String
Default: "public"

The location to look to locate font resources referenced in the CSS files being updated.

maxFileSize

Type: Number
Default: 4096

Images or fonts larger than this size will not be converted.

extensions

Type: Array
Default: ['css']

Files with this extension will be processed.

fileTypes

Type: Array
Default: ['png', 'jpg', 'jpeg', 'gif', 'svg']

Images/font references with these extensions will be replaced.

persist

Type: Boolean
Default: true

Enable\disable a persistent cache to improve build performance across restarts. Check out broccoli-persistent-filter for more details.

Running Tests

yarn install
yarn test

License

This project is distributed under the MIT license.

Readme

Keywords

Package Sidebar

Install

npm i @yapplabs/broccoli-base64-css

Weekly Downloads

0

Version

0.0.6

License

MIT

Unpacked Size

5.34 kB

Total Files

4

Last publish

Collaborators

  • lukemelia
  • yapplabs-owner