diff --git a/changelog/addcommand.dd b/changelog/addcommand.dd index 3a61406..55e9e2e 100644 --- a/changelog/addcommand.dd +++ b/changelog/addcommand.dd @@ -2,13 +2,20 @@ The `add` command adds a dependency to the dub.json/dub.sdl recipe file. -Running `dub add vibe-d` is equivalent to manually adding the following line to dub.sdl (X.Y.Z represents the latest version): -dependency "vibe-d" version="~>X.Y.Z" +Running `dub add vibe-d` queries the latest version for vibe-d from the +registry, then rewrites your recipe file with the new dependency added. -Or the following in dub.json: -"dependencies": { - "vibe-d": "~>X.Y.Z" -} +dub.json: +------ + "dependencies": { + "vibe-d": "~>X.Y.Z" + } +------ + +dub.sdl: +------ +dependency "vibe-d" version="~>X.Y.Z" +------ It is also possible to add multiple packages at once and explicitly add a simple $(LINK2 version specification,http://code.dlang.org/package-format?lang=json#version-specs) @@ -18,3 +25,6 @@ add the given 2 dependencies to the recipe file without querying the registry. Packages with and without version-specifier can be mixed in a single invocation. + +The can also be used to overwrite existing dependencies of the same name with +different version specifications.