Set output location for dub --single

Basile B. b2.temp at gmx.com
Mon Feb 28 08:03:24 UTC 2022


On Sunday, 27 February 2022 at 16:58:34 UTC, Chris Piker wrote:
> Hi D
>
> Coming from a python background it's worked well to organize my 
> D projects as a dub `sourceLibrary` and then to put top level 
> programs in a directory named `scripts` that are just dub 
> single file projects.  So the layout looks like this:
>
> [...]
>
> After reading over the dub documentation I don't see a general 
> way to override project options via the command line, but maybe 
> it's there and I couldn't understand what the dub docs were 
> trying to say.

That 's not exactly what you ask for but you can define the path 
in the embedded recipe (targetPath)

```d
#!/usr/bin/env dub
/+ dub.sdl:
    dependency "mypackage" version="*" path=".."
    targetPath "./bin"
+/
```



More information about the Digitalmars-d-learn mailing list