On Tuesday, 4 February 2020 at 09:21:17 UTC, Andre Pany wrote:
On Tuesday, 4 February 2020 at 09:13:48 UTC, mark wrote:
Is it possible to create a dub project that has one library and one or more executables (that use the library)? If so, could someone point me to the docs for this since I couldn't find this in the dub docs?
[snip]

Yes, using sub packages. Set the targetType of the root package to None and introduce 2 sub packages of targetType Executable and Library.

Ah, thank you.

And if I'm doing *separate* individual projects, for an app, dub creates source/app.d (which I rename src/app.d).

But what should it be for a library? Should it be src/package.d along with any supporting src/one.d src/two.do etc?

And is this documented anywhere?

(I thought I'd seen dub used with a --template argument, but can't find it; so maybe I'm mixing it up with something else?)

Reply via email to