generate standalone HTML file
See original GitHub issueWe archive reports per build and that includes source-map-explorer’s output. The HTML file is generated as follows
source-map-explorer dist/bundle.min.js \
--replace "`node -e 'console.log(process.cwd())'`/dist/" --with '' \
--html > reports/bundle-size.html
When opening that file the screen remains empty, because the following resources could not be loaded:
- file:///-path-to-project/node_modules/source-map-explorer/node_modules/underscore/underscore.js
- file:///-path-to-project/node_modules/source-map-explorer/vendor/webtreemap.css
- file:///-path-to-project/node_modules/source-map-explorer/vendor/webtreemap.js
Those files could either be inlined - so everything is contained in the generated HTML. Or source-map-explorer could accept a destination path and copy the required resources to it. E.g.
source-map-explorer dist/bundle.min.js \
--replace "`node -e 'console.log(process.cwd())'`/dist/" --with '' \
--html \
--destination reports/gustav
would create the following structure
reports/gustav
index.html
underscore.js
webtreemap.css
webtreemap.js
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Save HTML As Standalone Page: Exporting Tool?
Monolith is a CLI tool for saving complete web pages as a single HTML file. See https://github.com/Y2Z/monolith.
Read more >Create standalone HTML files #48 - mermaid-js/mermaid-cli
I think the easiest approach is to embed the JS file from a CDN, or render to svg and drop it in the...
Read more >Create static HTML files - Alpha Anywhere Documentation
Generate a static HTML version of your UX component. Several different files will be generated (e.g. .html, .css, .js, etc.).
Read more >How to create a standalone HTML web page
Hi, Is it possible to run html js app as standalone html web page juste like kendo ui by adding jquery script and...
Read more >Creating an HTML Packager - Rick Strahl's Web Log
A single self-contained HTML file with all resources embedded; An HTML file ... Create a zip file package of HTML file plus dependencies:....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This was fixed by #33 and released as 1.3.1.
PR #30 shows the original
--destination
idea, although the option is now called--directory
.