Skip to content

Commit 657ec58

Browse files
aviateskr-aviatesk
authored andcommitted
add build step to download bootswatch themes, and clean up .gitignore
1 parent 35aeb15 commit 657ec58

File tree

2 files changed

+28
-4
lines changed

2 files changed

+28
-4
lines changed

.gitignore

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
Manifest.toml
22

3+
/doc/build/
4+
/stylesheets/bootswatch/
5+
36
examples/figures/
47
examples/*.md
58
examples/*.pdf
69
examples/*.html
710
examples/*.rst
811
examples/*.tex
12+
913
test/**/cache
1014
test/**/figures
1115
test/documents/output/gadfly_formats_test.txt
@@ -19,10 +23,6 @@ test/**/chunk_options.jl
1923
test/**/*.ipynb
2024
!test/**/*ref.*
2125

22-
doc/build
23-
doc/site
24-
25-
.idea
2626
*.*~
2727
*.aux
2828
*.log

deps/build.jl

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# # to update `themes`
2+
# let
3+
# using HTTP, JSON
4+
# r = HTTP.request("GET", "https://bootswatch.com/api/4.json") |> HTTP.payload |> String |> JSON.parse
5+
# lowercase.(get.(values(r["themes"]), "name", "")) |> repr |> clipboard
6+
# end
7+
8+
bootswatch_version = "4"
9+
themes = ["cerulean", "cosmo", "cyborg", "darkly", "flatly", "journal", "litera", "lumen", "lux", "materia", "minty", "pulse", "sandstone", "simplex", "sketchy", "slate", "solar", "spacelab", "superhero", "united", "yeti"]
10+
targets = ["bootstrap.min.css", "_bootswatch.scss", "_variables.scss"]
11+
12+
BOOTSWATCH_DIR = normpath(@__DIR__, "..", "stylesheets", "bootswatch")
13+
isdir(BOOTSWATCH_DIR) || mkdir(BOOTSWATCH_DIR)
14+
15+
function download_theme(theme)
16+
theme_dir = normpath(BOOTSWATCH_DIR, theme)
17+
isdir(theme_dir) || mkdir(theme_dir)
18+
for target in targets
19+
file = normpath(theme_dir, target)
20+
isfile(file) || download("https://bootswatch.com/$(bootswatch_version)/$(theme)/$(target)", file)
21+
end
22+
end
23+
24+
download_theme.(themes)

0 commit comments

Comments
 (0)