How to use dub with our own package

Christian Köstlin christian.koestlin at gmail.com
Wed May 12 20:55:07 UTC 2021


On 2021-05-12 21:22, Vinod K Chandran wrote:
> On Wednesday, 12 May 2021 at 18:26:39 UTC, Christian Köstlin wrote:
> 
>> Are you really interested in doing winglib as a separate dub package?
>> If not you could just do a `dub init yourappname` which gives you the 
>> basic skeleton. something like:
>>
>> .
>> ├── dub.sdl
>> └── source
>>     └── app.d
>>
>>
>> then you replace app.d with your file + put your winglib with 
>> package.d into a subfolder under source ->
>>
>> .
>> ├── dub.sdl
>> └── source
>>     ├── app.d
>>     └── winglib
>>         ├── othermodule.d
>>         └── package.d
>>
>>
>> then a dub build will just build your project including the submodules 
>> ...
>>
>> if you need a separate dub package then the other answers lead the way.
>> https://dub.pm/commandline.html#add-local
> 
> That's really helpful. All i need to do is re-arrange my folder setup. 
> Thanks a lot. :)

if you want to do a separate package later on, you only have to change a 
little in your project setup, code can stay the same.

kind regards,
Christian



More information about the Digitalmars-d-learn mailing list