web-resource-inliner
web-resource-inliner copied to clipboard
Inlines img, script and link tags into the same file
input - `index.html` ```html ``` input - `css/noto-sans/latin.css` ```css /* noto-sans-latin-400-normal*/ @font-face { font-family: 'Noto Sans'; src: local('Noto Sans'), local('NotoSans'), url('./files/noto-sans-latin-400-normal.woff2') format('woff2'), url('./files/noto-sans-latin-400-normal.woff') format('woff'); } ``` actual result ```html /*...
Current code style is quite hard to maintain without any tools. I suggest to reformat the code with standard or prettier. Your choice. I can send a PR.
We already use promises internally. Perhaps it would be a good step forward to provide promise based api instead of old callback style. The code may be simplified as well.
If the content of `script.js` is: ```html alert('this should happen second'); ``` and the content of our HTML file is: ```html alert('this should happen first') ``` Then it gets "compiled"...
I am running the inliner on a JS-rendered HTML page saved with Chrome, which uses `data-src` attributes on some `img` tags to lazy-load images. For some reason the inliner seems...
Using path module to rebase remote resources causes URLs to be messed up and fail. Example: My HTML has Bootstrap css file referenced like this: `` Bootstrap references font files...
If `file://` is encountered, web-resource-inliner should correctly embed the file referenced. Currently it just appends the entire link to the `relativeTo` path, which causes inline-ing to fail. For example, if...
datauri version 2 contains a fix for a Webpack issue (see here for more context: https://github.com/data-uri/datauri/issues/20) Upgrading to that version would help folks that are webpacking this package or its...
In `util.getFileReplacement` where the file is local, the callback cannot be reached if the file can't be found: ``` var result = ( new datauri( util.getInlineFilePath( src, settings.relativeTo ) )...
It would be great to permit multiple `relativeTo` values, such that it would search across all directories for the first match found. If multiple found then it could give a...