Skip to content

Commit

Permalink
better error
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp committed Aug 10, 2024
1 parent 18ce17f commit 41b228a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/PlutoPages.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,12 @@ end


function create_subdirs(root_dir::String)
@assert(isdir(root_dir))
@assert(isdir(joinpath(root_dir, "src")))

@assert isdir(root_dir)
input_dir = joinpath(root_dir, "src")
@assert isdir(input_dir) "Input directory is empty: $(input_dir).\n\nUse PlutoPages in a directory with a 'src' subdirectory. Your notebooks and markdown files go in there."

(;
input_dir = joinpath(root_dir, "src"),
input_dir,
output_dir = mkpath(joinpath(root_dir, "_site")),
cache_dir = mkpath(joinpath(root_dir, "_cache")),
)
Expand Down Expand Up @@ -130,7 +131,6 @@ function develop(;
notebook = fetch(app.notebook_task)

ccall(:jl_exit_on_sigint, Cvoid, (Cint,), 0)
@info "PlutoPages: Press Ctrl+C multiple times to stop the server."
file_server_port = rand(8100:8900)

file_server_task = Threads.@spawn LiveServer.serve(; port=file_server_port, dir=output_dir, inject_browser_reload_script)
Expand All @@ -152,6 +152,8 @@ function develop(;
➡️ $(pluto_server_url)
✅✅✅
Press Ctrl+C multiple times to stop the development server.
"""

Expand All @@ -165,7 +167,6 @@ end




function generate(;
input_dir::String,
output_dir::String,
Expand Down

0 comments on commit 41b228a

Please sign in to comment.