Plots.jl/deps/build.jl
Fons van der Plas fb40ed1f59
Plotly fixed version (#2779)
* Fixed version for plotly.js dependency

* Fixed version for plotly.js dependency - .gitignore update
2020-06-17 11:17:37 +02:00

19 lines
637 B
Julia

#TODO: download https://cdn.plot.ly/plotly-1.54.2.min.js to deps/ if it doesn't exist
file_path = ""
if get(ENV, "PLOTS_HOST_DEPENDENCY_LOCAL", "false") == "true"
global file_path
local_fn = joinpath(dirname(@__FILE__), "plotly-1.54.2.min.js")
if !isfile(local_fn)
@info("Cannot find deps/plotly-1.54.2.min.js... downloading latest version.")
download("https://cdn.plot.ly/plotly-1.54.2.min.js", local_fn)
isfile(local_fn) && (file_path = local_fn)
else
file_path = local_fn
end
end
open("deps.jl", "w") do io
println(io, "const plotly_local_file_path = $(repr(file_path))")
end