On Thursday, 26 April 2018 at 18:16:01 UTC, FreeSlave wrote:
Most dub packages are libraries and should provide runnable examples.
What's the current idiomatic way to add examples?

IMO the most simple way (and the best too) is to put single file packages in the example folder, so that an example can just be run with DUB like that:

`dub example1.d`.

Other good point is that you can specify that the dependency to the main package is local, like here: https://github.com/BBasile/kheops/blob/master/runnable/actions_window.d#L5.

And finally the example folder is neither polluted with sub-folders nor with sub.selection JSON, FTW.

Reply via email to