Am 09.06.2017 um 09:31 schrieb Jacob Carlborg:
I'm working on creating a Dub package for DWT. Besides the library code it contains around 120 snippets (like small examples). These snippets consist of one file each, containing a main function and are self contained. It would be nice if these were easy to build for the users and I would also like to build all of them as part of a CI job when compiling the library code.
What's the best way to deal with this? One idea I have is to add an inline Dub file in each of the snippets files and then use a shell script to iterate all of them to compile them. Is there a better way to do this?
Single-file packages are definitely the best approach for small
examples. Sub packages would be rather bad because they would be exposed
publicly on the registry etc. Using a script that loops over all
examples to CI test is also what I do for my projects.