Skip to content

Commit

Permalink
v0.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
pfitzseb committed Jun 21, 2022
1 parent dc59cd9 commit 04bbb45
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 38 deletions.
6 changes: 3 additions & 3 deletions Artifacts.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[jlprofilecanvas]
git-tree-sha1 = "bca26d399369bd4063e570ac957d5f846e5b8a76"
git-tree-sha1 = "a910ea1b745c16784f3f8ce1f4b6f6d4da7d8da0"

[[jlprofilecanvas.download]]
sha256 = "d64f54d2e86395b41a33b3f8cb6204b5e0ea93f62656d2abf825aa614762b451"
url = "https://github.com/pfitzseb/jl-profile.js/archive/refs/tags/v0.5.1.tar.gz"
sha256 = "3d26f40bcc1cb0a5168adf2f6747e80b574dbefa8aaa5c5a083553c3b00870bc"
url = "https://github.com/pfitzseb/jl-profile.js/archive/refs/tags/v0.5.2.tar.gz"
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ProfileCanvas"
uuid = "efd6af41-a80b-495e-886c-e51b0c7d77a3"
authors = ["Sebastian Pfitzner <[email protected]> and contributors"]
version = "0.1.2"
version = "0.1.3"

[deps]
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
Expand Down
68 changes: 34 additions & 34 deletions src/ProfileCanvas.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,23 @@ function Base.show(io::IO, ::MIME"text/html", canvas::ProfileData)
id = "profiler-container-$(round(Int, rand()*100000))"

rootpath = artifact"jlprofilecanvas"
path = joinpath(rootpath, "jl-profile.js-0.5.1", "dist", "profile-viewer.js")
path = joinpath(rootpath, "jl-profile.js-0.5.2", "dist", "profile-viewer.js")

println(
io,
"""
<div id="$(id)" style="height: 400px; position: relative;"></div>
<script type="module">
$(read(path, String))
const viewer = new ProfileViewer("#$(id)", $(JSON.json(canvas.data)), "$(canvas.typ)")
</script>
"""
<div id="$(id)" style="height: 400px; position: relative;"></div>
<script type="module">
$(read(path, String))
const viewer = new ProfileViewer("#$(id)", $(JSON.json(canvas.data)), "$(canvas.typ)")
</script>
"""
)
end

function Base.display(_::ProfileDisplay, canvas::ProfileData)
rootpath = artifact"jlprofilecanvas"
path = joinpath(rootpath, "jl-profile.js-0.5.1", "dist", "profile-viewer.js")
path = joinpath(rootpath, "jl-profile.js-0.5.2", "dist", "profile-viewer.js")

file = string(tempname(), ".html")
open(file, "w") do io
Expand All @@ -65,32 +65,32 @@ function Base.display(_::ProfileDisplay, canvas::ProfileData)
println(
io,
"""
<html>
<head>
<style>
#$(id) {
margin: 0;
padding: 0;
width: 100vw;
height: 100vh;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
overflow: hidden;
}
body {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<div id="$(id)"></div>
<script type="module">
$(read(path, String))
const viewer = new ProfileViewer("#$(id)", $(JSON.json(canvas.data)), "$(canvas.typ)")
</script>
</body>
</html>
"""
<html>
<head>
<style>
#$(id) {
margin: 0;
padding: 0;
width: 100vw;
height: 100vh;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
overflow: hidden;
}
body {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<div id="$(id)"></div>
<script type="module">
$(read(path, String))
const viewer = new ProfileViewer("#$(id)", $(JSON.json(canvas.data)), "$(canvas.typ)")
</script>
</body>
</html>
"""
)
end
url = "file://$file"
Expand Down

2 comments on commit 04bbb45

@pfitzseb
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/62779

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.3 -m "<description of version>" 04bbb457b44b288fbc1d8fdec10f60ec36dae3f4
git push origin v0.1.3

Please sign in to comment.