There are many ways to contribute to drom. Here are a few starting points:
Suppose you think most OCaml projects should use a given tool. So, you
may want to contribute support for this tool into projects generated
by drom
.
Here is how to do it:
-
There are projects' skeletons in
src/drom_lib/skeletons/projects
, in particular thevirtual/
skeleton used as the basis for all other skeletons. You can add a new template file in that skeleton. Template files are used by substitutions of 3 kinds, !{EXPR}, !(FIELD) and ![FLAG]. Have a look at other templates for examples. -
Once you have added a file in the skeleton, modify the
dune-trailer
field of thedrom_lib
package indrom.toml
to add the new file as a dependency of the corresponding skeleton. You will need to calldrom project
to regenerate thedune
file after every change. -
You may also want to add specific substitutions for your template file. This is done by modifying the project substitution
project_brace
insrc/drom_lib/subst.ml
.
Known licenses are included by scanning the src/drom_lib/licenses/
directory. Have a look there for example. Every license is defined by:
- the name of its directory, which is the key used in the
license
field indrom.toml
- a file
NAME
with the long name of the license - a file
HEADER
with the lines to add in the header of every source file - a file
LICENSE
with the complete text of the license
Once you have added a new license, edit the dune-trailer
field in
drom.toml
to add the license files as dependencies (check where the
other licenses appear). You will need to call drom project
after
that to regenerate the corresponding dune
file.