Generate Data-URI scheme via terminal or node.js
Minimum support is now Node 10+, please use datauri 3 for previous versions.
CSS
rename class
config to className
rename background-size
config to backgroundSize
Isolate getCSS
in datauri/css
submodule
const datauri = require('datauri');
datauri('test/myfile.png', (err, content, meta) => {
meta.getCSS({
class: "myClass",
'background-size': true,
width: true,
height: true
}));
});
const datauriCSS = require('datauri/css');
await datauriCSS('test/myfile.png', {
className: "myClass",
backgroundSize: true,
width: true,
height: true
});
CLI
main
datauri/css
submodule.Fixes #21 #24
datauri
is no longer a class, but a promise based functionencodeSync
was moved to datauri/sync
More info: https://npmjs.com/datauri
First of all, I have to say sorry for taking that long to release this update. I had big problems last year which compromised my entire schedule.
#!/usr/bin/env node
only runs in cli script.Remove potential REDOS vulnerability from mimer https://github.com/data-uri/mimer/releases/tag/v0.3.0
Fix build encoding
Fix NPM meta data description
Doc tweaks for module, client and github readme. Big thanks to @zenorocha
Fix client dependency mismatch.