Skip to content

Commit aac1f65

Browse files
committed
update localmake
1 parent f85e529 commit aac1f65

File tree

1 file changed

+20
-23
lines changed

1 file changed

+20
-23
lines changed

docs/localmake.jl

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,27 @@ At the end of each run the user is prompted to rerun the make process. Using rev
1010
use the updated `*.md` and source files. This way the Julia session keeps alive and the
1111
individual builds are much faster.
1212
=#
13-
14-
#=
1513
using Pkg
14+
using Revise
15+
using LiveServer
16+
1617
Pkg.activate(@__DIR__)
17-
Pkg.instantiate()
18+
Pkg.develop(PackageSpec(path=dirname(@__DIR__))) # adds the package this script is called from
1819
print("Do you want to update docs environment? [y/n] ")
1920
answer = readline()
2021
if !isempty(answer) && answer[1] == 'y'
2122
Pkg.update()
2223
end
23-
24-
using Revise
25-
using LiveServer
26-
using REPL.TerminalMenus
24+
Pkg.instantiate()
2725

2826
port = isempty(ARGS) ? 8000 : parse(Int, ARGS[1])
2927
@assert 8000 port 9000 "port has to be in range 8000..9000!"
3028

3129
@info "Start server..."
3230
@async serve(;dir=joinpath(@__DIR__, "build"), port)
3331

34-
menu = RadioMenu(["Run again!", "Quit!"])
35-
while true
32+
run = true
33+
while run
3634
revise()
3735
@info "Start building docs..."
3836
try
@@ -41,23 +39,22 @@ while true
4139
@info "make.jl error" e
4240
end
4341

44-
println("\nDocs are served at http://localhost:$port")
45-
46-
if request("What now?", menu) != 1
47-
break
42+
printstyled("\n\nDocs are served at http://localhost:$port\n\n", color=:blue, bold=true)
43+
println("Run again? Enter! Exit with 'q'.")
44+
if readline() == "q"
45+
global run = false
4846
end
4947
end
50-
=#
5148

5249

53-
using Pkg
54-
Pkg.activate(@__DIR__)
55-
using NetworkDynamics
56-
using LiveServer
50+
# using Pkg
51+
# Pkg.activate(@__DIR__)
52+
# using NetworkDynamics
53+
# using LiveServer
5754

58-
cd(pkgdir(NetworkDynamics))
55+
# cd(pkgdir(NetworkDynamics))
5956

60-
servedocs(
61-
literate_dir = joinpath("docs", "examples"),
62-
skip_dir = joinpath("docs", "src", "generated")
63-
)
57+
# servedocs(
58+
# literate_dir = joinpath("docs", "examples"),
59+
# skip_dir = joinpath("docs", "src", "generated")
60+
# )

0 commit comments

Comments
 (0)