1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-11-30 08:26:59 +02:00
joplin/packages/htmlpack
renovate[bot] 2625f0d89e
Update dependency fs-extra to v11.2.0 (#9686)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-08 11:53:28 +00:00
..
src Chore: Migrate from css to @adobe/css-tools (#9660) 2024-01-06 12:13:23 +00: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
package.json Update dependency fs-extra to v11.2.0 (#9686) 2024-01-08 11:53:28 +00: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
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

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