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.
createEmptyPackage
void createEmptyPackage(Path path)
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.

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)
Undocumented in source. Be warned that the author may not have intended to support it.
install
Package install(string packageId, Dependency dep, InstallLocation location, bool force_branch_upgrade)

Installs the package matching the dependency into the application.

installedPackages
string[string] installedPackages()

Gets all installed packages as a "packageId" = "version" associative array

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.

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()
Undocumented in source. Be warned that the author may not have intended to support it.
uninstall
void uninstall(Package pack)

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

uninstall
void uninstall(string package_id, string version_, InstallLocation location_)

This will uninstall 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 installed. This will throw an exception, if there are multiple versions installed. Note: as wildcard string only "*" is supported. @param location_

update
void update(UpdateOptions options)

Performs installation and uninstallation as necessary for the application. @param options bit combination of UpdateOptions

Manifest constants

UninstallVersionWildcard
enum UninstallVersionWildcard;

@see uninstall(string, string, InstallLocation)

Properties

configurations
string[] configurations [@property getter]
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.
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]

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

Meta