mirror of https://github.com/fredrikekre/HYPRE.jl
2 changed files with 28 additions and 7 deletions
@ -1,11 +1,8 @@ |
|||||||
SRCDIR:=$(shell dirname $(abspath $(firstword $(MAKEFILE_LIST)))) |
SRCDIR:=$(shell dirname $(abspath $(firstword $(MAKEFILE_LIST)))) |
||||||
|
|
||||||
default: livedocs |
default: liveserver |
||||||
|
|
||||||
instantiate: |
liveserver: |
||||||
julia --project=${SRCDIR} -e 'using Pkg; Pkg.instantiate()' |
julia --project=${SRCDIR} ${SRCDIR}/liveserver.jl |
||||||
|
|
||||||
livedocs: instantiate |
.PHONY: default liveserver |
||||||
julia --project=${SRCDIR} -e 'using LiveServer; LiveServer.servedocs(; foldername=pwd())' -- liveserver |
|
||||||
|
|
||||||
.PHONY: default instantiate livedocs |
|
||||||
|
|||||||
@ -0,0 +1,24 @@ |
|||||||
|
#!/usr/bin/env julia |
||||||
|
|
||||||
|
# Root of the repository |
||||||
|
const repo_root = dirname(@__DIR__) |
||||||
|
|
||||||
|
# Make sure docs environment is active and instantiated |
||||||
|
import Pkg |
||||||
|
Pkg.activate(@__DIR__) |
||||||
|
Pkg.instantiate() |
||||||
|
|
||||||
|
# Communicate with docs/make.jl that we are running in live mode |
||||||
|
push!(ARGS, "liveserver") |
||||||
|
|
||||||
|
# Run LiveServer.servedocs(...) |
||||||
|
import LiveServer |
||||||
|
LiveServer.servedocs(; |
||||||
|
# Documentation root where make.jl and src/ are located |
||||||
|
foldername = joinpath(repo_root, "docs"), |
||||||
|
# Extra source folder to watch for changes |
||||||
|
include_dirs = [ |
||||||
|
# Watch the src folder so docstrings can be Revise'd |
||||||
|
joinpath(repo_root, "src"), |
||||||
|
], |
||||||
|
) |
||||||
Loading…
Reference in new issue