Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a69ecee

Browse files
committedMay 25, 2020
add build step to download bootswatch themes, and clean up .gitignore
1 parent a89907b commit a69ecee

File tree

2 files changed

+29
-12
lines changed

2 files changed

+29
-12
lines changed
 

‎.gitignore

+5-12
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1+
Manifest.toml
2+
3+
/doc/build/
4+
/stylesheets/bootswatch/
15

2-
src/*.cov
3-
test.jl
46
examples/figures/
57
examples/*.md
68
examples/*.pdf
79
examples/*.html
810
examples/*.rst
911
examples/*.tex
12+
1013
test/**/cache
1114
test/**/figures
1215
test/documents/output/gadfly_formats_test.txt
@@ -20,17 +23,7 @@ test/**/chunk_options.jl
2023
test/**/*.ipynb
2124
!test/**/*ref.*
2225

23-
doc/build
24-
doc/site
25-
stable/
26-
doc/Manifest.toml
27-
Manifest.toml
28-
29-
tmp/
30-
.idea
3126
*.*~
3227
*.aux
3328
*.log
3429
*.out
35-
\#*\#
36-
.juliahistory

‎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)
Please sign in to comment.