Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 772 Bytes

README.md

File metadata and controls

20 lines (15 loc) · 772 Bytes

Build Status

About

PostCSS postprocessor for moving big base64 inlines to separate css file.

API

DataSplit supports two options:

  • minLength minimum size of inlined block that will be moved to separate file. Defaut is 0 (all inlines are moved);
  • dataRegexp – regular expression to find inlines. Default is /url\(('|")?data/g

Example

var DataSplit = require('data-split')
splitter = new DataSplit();
var result = splitter.process(cssString);
// New css with all inlines
console.log(result.inlines.toString());
// Your css without inlines
console.log(result.target.toString());