Skip to content

Commit 81494ad

Browse files
committed
Add script build_docu.jl
1 parent 9c4e4cb commit 81494ad

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

scripts/build_docu.jl

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# build and display the html documentation locally
2+
# you must have installed the package LiveServer in your global environment
3+
4+
using Pkg
5+
6+
function globaldependencies()
7+
projectpath = Pkg.project().path
8+
basepath, _ = splitdir(projectpath)
9+
Pkg.activate()
10+
globaldependencies = keys(Pkg.project().dependencies)
11+
Pkg.activate(basepath)
12+
globaldependencies
13+
end
14+
15+
if !("LiveServer" in globaldependencies())
16+
println("Installing LiveServer globally!")
17+
run(`julia -e 'using Pkg; Pkg.add("LiveServer")'`)
18+
end
19+
20+
if !("Documenter" keys(Pkg.project().dependencies))
21+
using TestEnv
22+
TestEnv.activate()
23+
end
24+
using LiveServer; servedocs(launch_browser=true)

0 commit comments

Comments
 (0)