Thread overview | |||||
---|---|---|---|---|---|
|
April 21, 2020 Can I use dub to build multiple app.d files? | ||||
---|---|---|---|---|
| ||||
Hi there. I have been using dub for a while now -maybe 12 months- but I haven't been able to figure out if you can build multiple app.d files with it. Is it possible to use dub run command to build multiple executables in one shot? Maybe the question is weird, because dub might not be the tool to do that sort of thing. In that case, I would appreciate pointers. Thanks, Selim |
April 21, 2020 Re: Can I use dub to build multiple app.d files? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Selim | On Tuesday, 21 April 2020 at 16:14:54 UTC, Selim wrote:
> Hi there. I have been using dub for a while now -maybe 12 months- but I haven't been able to figure out if you can build multiple app.d files with it. Is it possible to use dub run command to build multiple executables in one shot?
>
> Maybe the question is weird, because dub might not be the tool to do that sort of thing. In that case, I would appreciate pointers.
>
> Thanks,
> Selim
Hi Selim,
Yes it is supported. In dub.json you set targetType of your main dub package to none and add several sub packages (with targetType executable).
Kind regards
Andre
|
April 21, 2020 Re: Can I use dub to build multiple app.d files? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andre Pany | On Tuesday, 21 April 2020 at 17:50:03 UTC, Andre Pany wrote: > On Tuesday, 21 April 2020 at 16:14:54 UTC, Selim wrote: >> Hi there. I have been using dub for a while now -maybe 12 months- but I haven't been able to figure out if you can build multiple app.d files with it. Is it possible to use dub run command to build multiple executables in one shot? >> >> Maybe the question is weird, because dub might not be the tool to do that sort of thing. In that case, I would appreciate pointers. >> >> Thanks, >> Selim > > Hi Selim, > > Yes it is supported. In dub.json you set targetType of your main dub package to none and add several sub packages (with targetType executable). > > Kind regards > Andre Thanks again for the fast reply, Andre! I used your answer as a guide and found about sub packages example in [1]. And used the command line example from stack overflow [2]: dub run mainPackageName:<subPackageName>. It got me what I wanted. S [1] https://dub.pm/package-format-sdl.html#target-types [2] https://stackoverflow.com/questions/35319543/how-to-add-and-run-subpackages-in-dub |
Copyright © 1999-2021 by the D Language Foundation