Aaron Thomas
Aaron Thomas

Reputation: 5281

Using DUB package with existing code

I'd like to use a DUB package library written by someone else with some existing d source code of my own. My existing source has been using Git, and has not been using DUB.

I'd like to continue using the same Git repo after incorporating the DUB package.

I've tried various settings in dub.json, but none seem to work with this situation. I'd hate to do a dub init, then manually copy everything over and link back to my Git repo.

What is my best option?

Upvotes: 1

Views: 137

Answers (1)

Qurashi
Qurashi

Reputation: 1467

If you only want to use the library, you can clone it and pass it to the compiler when compiling using -I, read more here

If you want to add dub support to your project, just create a source directory, copy your project into it and create a dub.json file, plus rename your entry point file to app.d, or change the entry file in the dub.json, you can read more about that here

Upvotes: 1

Related Questions