libraryDependency

Undocumented in source. Be warned that the author may not have intended to support it.
libraryDependency
(
string root
,
string prefix = ""
,
bool verbose = false
,
size_t maxDepth = 3
)

Examples

import std.path;
import std.process;

auto dc = environment.get("DC");
assert(dc != "", "use DUB or set DC enviroment variable");
auto which = executeShell("which " ~ dc);
assert(which.status == 0);
version(DigitalMars) {
    auto root = which.output.dirName ~ "/../../src/phobos/";
}
version(LDC) {
    auto root = which.output.dirName ~ "/../import/";
}

auto g = libraryDependency(root, "std/range", true);
g.save("range.dot");

Meta