Skip to content

Commit a44b4b7

Browse files
committed
give up on artifact for now
1 parent 3c9adce commit a44b4b7

File tree

4 files changed

+5
-16
lines changed

4 files changed

+5
-16
lines changed

Project.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ DefaultApplication = "3f0dd361-4fe0-5fc6-8523-80b14ec94d85"
99
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
1010
EasyConfig = "acab07b0-f158-46d4-8913-50acef6d41fe"
1111
JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1"
12-
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
1312
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1413

1514
[compat]

deps/build.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
download("https://cdn.plot.ly/plotly-2.8.3.min.js", joinpath(@__DIR__, "plotly-2.8.3.min.js"))

src/PlotlyLight.jl

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,11 @@ using Downloads
99

1010
export Plot, Config
1111

12-
#-----------------------------------------------------------------------------# plotly.js artifact
13-
plotlyjs = let
14-
artifacts_toml = abspath(joinpath(@__DIR__, "..", "Artifacts.toml"))
15-
plotlylatest_hash = artifact_hash("plotlylatest", artifacts_toml)
16-
17-
if isnothing(plotlylatest_hash) || !artifact_exists(plotlylatest_hash)
18-
plotlylatest_hash = create_artifact() do dir
19-
Downloads.download("https://cdn.plot.ly/plotly-2.8.3.min.js", joinpath(dir, "plotly-latest.min.js"))
20-
end
21-
bind_artifact!(artifacts_toml, "plotlylatest", plotlylatest_hash; force=true)
22-
end
23-
joinpath(artifact_path(plotlylatest_hash), "plotly-latest.min.js")
12+
function __init__()
13+
global plotlyjs = joinpath(@__DIR__, "..", "deps", "plotly-2.8.3.min.js")
14+
!(isfile(plotlyjs)) && @warn "Cannot find plotly.js. PlotlyLight should be built again."
2415
end
2516

26-
27-
2817
#-----------------------------------------------------------------------------# src
2918
src_opts = [:cdn, :local, :standalone, :none]
3019
plotlysrc = Ref(:cdn)

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ end
2020
@test length(repr("text/html", p)) > 1000
2121

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

0 commit comments

Comments
 (0)