HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

dub — Package manager for D packages. More information: <https://dub.pm/commandline/>.

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commanddubclimorepackageformanagerpackages

Problem

How to use the dub command: Package manager for D packages. More information: <https://dub.pm/commandline/>.

Solution

dub — Package manager for D packages. More information: <https://dub.pm/commandline/>.

Interactively create a new D project:
dub init {{project_name}}


Non-interactively create a new D project:
dub init {{project_name}} {{[-n|--non-interactive]}}


Build and run a D project:
dub


Install dependencies specified in a D project's dub.json or dub.sdl file:
dub fetch


Update the dependencies in a D project:
dub upgrade


Display help:
dub {{[-h|--help]}}

Code Snippets

Interactively create a new D project

dub init {{project_name}}

Non-interactively create a new D project

dub init {{project_name}} {{[-n|--non-interactive]}}

Build and run a D project

dub

Install dependencies specified in a D project's `dub.json` or `dub.sdl` file

dub fetch

Update the dependencies in a D project

dub upgrade

Context

tldr-pages: common/dub

Revisions (0)

No revisions yet.