-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add offline support by vendoring webtreemap and using file:// URLs #26
Conversation
@@ -189,7 +190,9 @@ var html = fs.readFileSync(path.join(__dirname, 'tree-viz.html')).toString(); | |||
|
|||
html = html.replace('INSERT TREE HERE', JSON.stringify(sizes, null, ' ')) | |||
.replace('INSERT TITLE HERE', args['<script.js>']) | |||
|
|||
.replace('underscore.js', fileURL(require.resolve('underscore'))) | |||
.replace('webtreemap.js', fileURL(require.resolve('./vendor/webtreemap.js'))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will this break on Windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wrote it on Windows 😸 Node.js path stuff works fine on Windows if you just use /
everywhere, as long as the developers of libs you're using used path
.
Thanks for the PR. It looks fine module the comments I left. It would be nice to get your PR merged into webtreemap. |
I assume that's due to the JavaScript tweaks in rmmh/webtreemap@318c345 - you could vendor the original instead until it's published: https://github.com/martine/webtreemap/blob/a5c3115092f3ce97c6544aff4af465a88010f01d/webtreemap.js I only pulled in the contents from the other PR because I was playing with it locally and it had already removed the CSS vendor prefix on animation. |
I understand why the change is happening, I'm just wondering what the On Wed, Jan 13, 2016 at 3:19 PM Jonny Buchanan notifications@github.com
|
After playing around with this, I much prefer the newer layout. I'll pull and cut a new release. Thanks! |
Add offline support by vendoring webtreemap and using file:// URLs
|
The vendored version of webtreemap is from this PR, which fixes a layout issue and removes the vendor prefix from CSS animation: evmar/webtreemap#2
I've also created an issue to request that webtreemap be published to npm so it doesn't have to be vendored: evmar/webtreemap#7
I'm subscribed to the PR and the issue and am willing to create further PRs to remove vendoring when possible.
Thanks for creating source-map-explorer - I found it invaluable while learning to tame Webpack bundling and continue to do so 👍