Skip to content

Commit

Permalink
give up on artifact for now
Browse files Browse the repository at this point in the history
  • Loading branch information
joshday committed Feb 4, 2022
1 parent 3c9adce commit a44b4b7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 16 deletions.
1 change: 0 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ DefaultApplication = "3f0dd361-4fe0-5fc6-8523-80b14ec94d85"
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
EasyConfig = "acab07b0-f158-46d4-8913-50acef6d41fe"
JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[compat]
Expand Down
1 change: 1 addition & 0 deletions deps/build.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
download("https://cdn.plot.ly/plotly-2.8.3.min.js", joinpath(@__DIR__, "plotly-2.8.3.min.js"))
17 changes: 3 additions & 14 deletions src/PlotlyLight.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,11 @@ using Downloads

export Plot, Config

#-----------------------------------------------------------------------------# plotly.js artifact
plotlyjs = let
artifacts_toml = abspath(joinpath(@__DIR__, "..", "Artifacts.toml"))
plotlylatest_hash = artifact_hash("plotlylatest", artifacts_toml)

if isnothing(plotlylatest_hash) || !artifact_exists(plotlylatest_hash)
plotlylatest_hash = create_artifact() do dir
Downloads.download("https://cdn.plot.ly/plotly-2.8.3.min.js", joinpath(dir, "plotly-latest.min.js"))
end
bind_artifact!(artifacts_toml, "plotlylatest", plotlylatest_hash; force=true)
end
joinpath(artifact_path(plotlylatest_hash), "plotly-latest.min.js")
function __init__()
global plotlyjs = joinpath(@__DIR__, "..", "deps", "plotly-2.8.3.min.js")
!(isfile(plotlyjs)) && @warn "Cannot find plotly.js. PlotlyLight should be built again."
end



#-----------------------------------------------------------------------------# src
src_opts = [:cdn, :local, :standalone, :none]
plotlysrc = Ref(:cdn)
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ end
@test length(repr("text/html", p)) > 1000

PlotlyLight.src!(:local)
@test occursin("artifact", repr("text/html", p))
@test occursin("deps", repr("text/html", p))
end

2 comments on commit a44b4b7

@joshday
Copy link
Member Author

@joshday joshday commented on a44b4b7 Feb 4, 2022

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 updated: JuliaRegistries/General/53813

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.4.0 -m "<description of version>" a44b4b7ad17596567c43158cc82afeb5af33b81b
git push origin v0.4.0

Please sign in to comment.