diff --git a/.gitignore b/.gitignore index c96e00fb..ff05ccc2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,15 @@ Manifest.toml +/doc/build/ +/stylesheets/bootswatch/ + examples/figures/ examples/*.md examples/*.pdf examples/*.html examples/*.rst examples/*.tex + test/**/cache test/**/figures test/documents/output/gadfly_formats_test.txt @@ -19,10 +23,6 @@ test/**/chunk_options.jl test/**/*.ipynb !test/**/*ref.* -doc/build -doc/site - -.idea *.*~ *.aux *.log diff --git a/deps/build.jl b/deps/build.jl new file mode 100644 index 00000000..941a1cf9 --- /dev/null +++ b/deps/build.jl @@ -0,0 +1,24 @@ +# # to update `themes` +# let +# using HTTP, JSON +# r = HTTP.request("GET", "https://bootswatch.com/api/4.json") |> HTTP.payload |> String |> JSON.parse +# lowercase.(get.(values(r["themes"]), "name", "")) |> repr |> clipboard +# end + +bootswatch_version = "4" +themes = ["cerulean", "cosmo", "cyborg", "darkly", "flatly", "journal", "litera", "lumen", "lux", "materia", "minty", "pulse", "sandstone", "simplex", "sketchy", "slate", "solar", "spacelab", "superhero", "united", "yeti"] +targets = ["bootstrap.min.css", "_bootswatch.scss", "_variables.scss"] + +BOOTSWATCH_DIR = normpath(@__DIR__, "..", "stylesheets", "bootswatch") +isdir(BOOTSWATCH_DIR) || mkdir(BOOTSWATCH_DIR) + +function download_theme(theme) + theme_dir = normpath(BOOTSWATCH_DIR, theme) + isdir(theme_dir) || mkdir(theme_dir) + for target in targets + file = normpath(theme_dir, target) + isfile(file) || download("https://bootswatch.com/$(bootswatch_version)/$(theme)/$(target)", file) + end +end + +download_theme.(themes)