Skip to content

Commit

Permalink
Get developer package path in __init__ function, so it runs after loa…
Browse files Browse the repository at this point in the history
…ding of the module instead of only when precompiling. Fixes #18
  • Loading branch information
Niels1006 committed Feb 21, 2025
1 parent 929d7af commit 33089b4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/PlutoBoard.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@ include("fileserver/FileServer.jl")
include("websocket/WebSocket.jl")
include("plugins/LoadPlugin.jl")

function __init__()
global SERVE_DIR = joinpath(pwd(), "static")
end


const plutoboard_filepath = dirname(dirname(pathof(PlutoBoard)))
const config = TOML.parsefile(plutoboard_filepath * "/config/config.toml")
plutoboard_filepath = dirname(dirname(pathof(PlutoBoard)))
config = TOML.parsefile(plutoboard_filepath * "/config/config.toml")


html_path::Union{String,Nothing} = nothing
Expand All @@ -33,8 +37,6 @@ stylesheet_urls::Array{String} = []
fileserver = nothing
websocket = nothing

const SERVE_DIR = joinpath(pwd(), "static")

# Plugins
js_files_to_load::Array{String} = []

Expand Down

0 comments on commit 33089b4

Please sign in to comment.