Dub

The Dub class helps in getting the applications dependencies up and running. An instance manages one application.

Constructors

this
this(PackageSupplier[] additional_package_suppliers, string root_path)

Initiales the package manager for the vibe application under root.

Members

Functions

addLocalPackage
void addLocalPackage(string path, string ver, bool system)
Undocumented in source. Be warned that the author may not have intended to support it.
addSearchPath
void addSearchPath(string path, bool system)
Undocumented in source. Be warned that the author may not have intended to support it.
cachedPackages
string[string] cachedPackages()

Returns all cached packages as a "packageId" = "version" associative array

createEmptyPackage
void createEmptyPackage(Path path, string type)
Undocumented in source. Be warned that the author may not have intended to support it.
describeProject
void describeProject(BuildPlatform platform, string config)

Outputs a JSON description of the project, including its dependencies.

fetch
Package fetch(string packageId, Dependency dep, PlacementLocation location, bool force_branch_upgrade, bool use_prerelease)

Fetches the package matching the dependency and places it in the specified location.

generateProject
void generateProject(string ide, GeneratorSettings settings)

Generate project files for a specified IDE. Any existing project files will be overridden.

getDefaultConfiguration
string getDefaultConfiguration(BuildPlatform platform, bool allow_non_library_configs)
Undocumented in source. Be warned that the author may not have intended to support it.
loadPackage
void loadPackage(Path path)

Loads the package from the specified path as the main project package.

loadPackage
void loadPackage(Package pack)

Loads a specific package as the main project package (can be a sub package)

loadPackageFromCwd
void loadPackageFromCwd()

Loads the package from the current working directory as the main project package.

remove
void remove(Package pack)

Removes a given package from the list of present/cached modules. @removeFromApplication: if true, this will also remove an entry in the list of dependencies in the application's package.json

remove
void remove(string package_id, string version_, PlacementLocation location_)

This will remove a given package with a specified version from the location. It will remove at most one package, unless @param version_ is specified as wildcard "*". @param package_id Package to be removed @param version_ Identifying a version or a wild card. An empty string may be passed into. In this case the package will be removed from the location, if there is only one version retrieved. This will throw an exception, if there are multiple versions retrieved. Note: as wildcard string only "*" is supported. @param location_

removeLocalPackage
void removeLocalPackage(string path, bool system)
Undocumented in source. Be warned that the author may not have intended to support it.
removeSearchPath
void removeSearchPath(string path, bool system)
Undocumented in source. Be warned that the author may not have intended to support it.
runDdox
void runDdox(bool run)
Undocumented in source. Be warned that the author may not have intended to support it.
testProject
void testProject(BuildSettings build_settings, BuildPlatform platform, string config, Path custom_main_file, string[] run_args)
Undocumented in source. Be warned that the author may not have intended to support it.
update
void update(UpdateOptions options)

Performs retrieval and removal as necessary for the application. @param options bit combination of UpdateOptions

Manifest constants

RemoveVersionWildcard
enum RemoveVersionWildcard;

@see remove(string, string, RemoveLocation)

Properties

configurations
string[] configurations [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
dryRun
bool dryRun [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
packageManager
inout(PackageManager) packageManager [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
project
inout(Project) project [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
projectName
string projectName [@property getter]

Returns the name listed in the package.json of the current application.

projectPath
Path projectPath [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
rootPath
Path rootPath [@property getter]
Path rootPath [@property setter]

Returns the root path (usually the current working directory).

Meta