Thanks for all the helpful advice.
I am trying out this structure:
bin
docs
tests
nim.cfg which contains one line: --path:"../project/"
test_project.nim
test_file1.nim
project.nimble
project
project.nim
file.nim
private
t.nim
project.nimble contains tasks for compiling source, tests and docs. The binary
files go in the bin folder, the html files go in the docs folder. Below are the
tasks in the nimble file. Run "nimble m" to build and run the main project file.
skipDirs = @["tests", "private"]
task m, "Build and run project":
exec "nim c -r --out:bin/project project/project"
task test, "test project":
exec "nim c -r --out:bin/test_project tests/test_project"
task test_file1, "test file1":
exec "nim c -r --out:bin/test_file1 tests/test_file1"
task docs, "Build all the docs":
exec "nim doc --out:docs/project.html project/project.nim"
exec "nim doc --out:docs/file1.html project/file.nim"
task tree, "Show the directory tree":
exec "tree -I '*~|nimcache'"