Skip to content

Commit

Permalink
Document tested usage
Browse files Browse the repository at this point in the history
  • Loading branch information
shonfeder committed Nov 19, 2022
1 parent aff078b commit 60aded2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
6 changes: 5 additions & 1 deletion README.org
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ opam pin [email protected]:shonfeder/nomad.git
If you project's name is =dingus=

#+BEGIN_SRC sh
nomad new --bin dingus
nomad new dingus
#+END_SRC

And a scaffold for building the dingus executable will be created in the
Expand Down Expand Up @@ -46,6 +46,10 @@ nomad sync
And the dependencies declared in your project's =dune-project= will be synced
using opam.

** Examples

For more examples of usage, see [[file:test/README.org][test/README.org]].

* Plans and ideas

See [[https://github.com/shonfeder/nomad/blob/master/project.org][project.org]].
9 changes: 9 additions & 0 deletions test/README.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#+title: Examples

Relatively exhaustive (annotated and tested) examples of nomad's usage are
available in the blackbox tests:

- [[file:new.t/run.t][Creating new projects]]
- [[file:add.t/run.t][Adding components to a project]]
- [[file:sync.t/run.t][Syncing a project's dependencies]]
- [[file:config.t/][Inspecting and managing nomad's configuration]]
5 changes: 3 additions & 2 deletions test/config.t/run.t
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
Create an empty config to avoid searching into the runner environments file system

$ mkdir .nomad && echo "()" > .nomad/config.sexp

When no config file is specified, use the nearest config dir
When no config values are specified, use the nearest config dir

$ nomad config
((author "Author Name") (username github-username)
(dev_packages
(merlin>=4.6.1~5.0preview utop ocp-indent ocp-index odoc odig)))

Can read data from the nearest config dir
Can read config overrides from the nearest config dir

$ echo '((author "Test Name") (username test-username))' > .nomad/config.sexp
$ nomad config
Expand Down

0 comments on commit 60aded2

Please sign in to comment.