joplin/packages/htmlpack
Laurent Cozic 2e2a2b3193 Tools: Implement @typescript-eslint/no-explicit-any rule 2024-04-05 12:16:49 +01:00
..
src Tools: Implement @typescript-eslint/no-explicit-any rule 2024-04-05 12:16:49 +01:00
.gitignore All: Implemented htmlpack package which could be used to export an HTML file and all its resources into a single HTML file 2021-09-26 17:58:06 +01:00
README.md All: Implemented htmlpack package which could be used to export an HTML file and all its resources into a single HTML file 2021-09-26 17:58:06 +01:00
package.json Chore: Setup new release 3.0 2024-03-02 11:04:23 +00:00
tsconfig.json All: Implemented htmlpack package which could be used to export an HTML file and all its resources into a single HTML file 2021-09-26 17:58:06 +01:00

README.md

HTMLPACK

Pack an HTML and all its JavaScript, CSS, image, fonts, and external files into a single HTML file. JavaScript and CSS is embedded in STYLE and SCRIPT tags, while all other files and images are converted to dataUri format and embedded in the document.

Usage

import htmlpack from '@joplin/htmlpack';
htmlpack('/path/to/input.html', '/path/to/output.html');

Notes

  • The script works in synchronous way so it will block the calling process while running.
  • No security check on what's included.

License

MIT