replace Artifact by Scratchspace
This commit is contained in:
parent
21bbf7f1d4
commit
90c8fa2b42
@ -1,7 +0,0 @@
|
|||||||
[plotly]
|
|
||||||
git-tree-sha1 = "f03dd0451a05a5fdbbcb3e548998a9d7a1ab6368"
|
|
||||||
lazy = true
|
|
||||||
|
|
||||||
[[plotly.download]]
|
|
||||||
url = "https://cdn.plot.ly/plotly-1.54.2.min.js"
|
|
||||||
sha256 = "487f1da6b7a1f127de59af8a65bb3fe2c63d709f011afea82896bdce28ecc0f8"
|
|
||||||
@ -27,6 +27,7 @@ RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
|
|||||||
RecipesPipeline = "01d81517-befc-4cb6-b9ec-a95719d0359c"
|
RecipesPipeline = "01d81517-befc-4cb6-b9ec-a95719d0359c"
|
||||||
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
|
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
|
||||||
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
|
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
|
||||||
|
Scratch = "6c6a2e73-6563-6170-7368-637461726353"
|
||||||
Showoff = "992d4aef-0814-514b-bc4d-f2e9a6c4116f"
|
Showoff = "992d4aef-0814-514b-bc4d-f2e9a6c4116f"
|
||||||
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
|
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
|
||||||
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
|
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
|
||||||
@ -44,7 +45,6 @@ JSON = "0.21, 1"
|
|||||||
Latexify = "0.14"
|
Latexify = "0.14"
|
||||||
Measures = "0.3"
|
Measures = "0.3"
|
||||||
NaNMath = "0.3"
|
NaNMath = "0.3"
|
||||||
PGFPlotsX = "1.2.0"
|
|
||||||
PlotThemes = "2"
|
PlotThemes = "2"
|
||||||
PlotUtils = "1"
|
PlotUtils = "1"
|
||||||
RecipesBase = "1"
|
RecipesBase = "1"
|
||||||
@ -52,9 +52,8 @@ RecipesPipeline = "0.1.13"
|
|||||||
Reexport = "0.2"
|
Reexport = "0.2"
|
||||||
Requires = "1"
|
Requires = "1"
|
||||||
Showoff = "0.3.1"
|
Showoff = "0.3.1"
|
||||||
StableRNGs = "0.1.1"
|
|
||||||
StatsBase = "0.32, 0.33"
|
StatsBase = "0.32, 0.33"
|
||||||
julia = "1.3"
|
julia = "1.5"
|
||||||
|
|
||||||
[extras]
|
[extras]
|
||||||
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
|
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
|
||||||
|
|||||||
16
src/init.jl
16
src/init.jl
@ -1,7 +1,8 @@
|
|||||||
using REPL
|
using REPL
|
||||||
using Pkg.Artifacts
|
using Scratch
|
||||||
|
|
||||||
|
const plotly_local_file_path = Ref{String}()
|
||||||
|
|
||||||
const plotly_local_file_path = Ref("")
|
|
||||||
|
|
||||||
function _plots_defaults()
|
function _plots_defaults()
|
||||||
if isdefined(Main, :PLOTS_DEFAULTS)
|
if isdefined(Main, :PLOTS_DEFAULTS)
|
||||||
@ -78,16 +79,11 @@ function __init__()
|
|||||||
end
|
end
|
||||||
|
|
||||||
if get(ENV, "PLOTS_HOST_DEPENDENCY_LOCAL", "false") == "true"
|
if get(ENV, "PLOTS_HOST_DEPENDENCY_LOCAL", "false") == "true"
|
||||||
artifact_toml = joinpath(@__DIR__, "Artifacts.toml")
|
global plotly_local_file_path[] = joinpath(@get_scratch!("plotly"), "plotly-1.54.2.min.js")
|
||||||
|
if !isfile(plotly_local_file_path[])
|
||||||
plotly_sha = artifact_hash("plotly", artifact_toml)
|
download("https://cdn.plot.ly/plotly-1.54.2.min.js", plotly_local_file_path[])
|
||||||
if plotly_sha === nothing || !artifact_exists(plotly_sha)
|
|
||||||
plotly_sha = create_artifact() do artifact_dir
|
|
||||||
download("https://cdn.plot.ly/plotly-1.54.2.min.js", joinpath(artifact_dir, "plotly-1.54.2.min.js"))
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
plotly_local_file_path[] = joinpath(artifact_path(plotly_sha), "plotly-1.54.2.min.js")
|
|
||||||
use_local_plotlyjs[] = true
|
use_local_plotlyjs[] = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user