Optimus CSS
Node.js stream transform and CLI to inline CSS image references as Base64-encoded data-URIs.
Install
npm install optimus-css
Usage
In your terminal (or package.json
scripts, or Makefile
):
optimus app/css/app.css --cwd app --output build --verbose
optimus --help
for options usage, also accepts multiple file paths.
In your code
var optimus = path = ; fs ;
Also supports new Optimus(options)
syntax and will output events:
notfound
- when an image file path cannot be resolved, event data will be the path as found in the CSSurl()
declaration.