Creating the project

To create a DUB compatible project, the easiest way is to use the dub executable. $ dub init myproject will create a new folder myproject that contains the recommended skeleton and a basic dub.json file. Running $ dub from this directory will build and run the empty project.

You should then adjust dub.json to fit the project. Especially the "authors", "copyright", "license" and "description" fields should be properly filled out before publishing. For details about the format of this file, see the package format page.

Registering with the registry

If you want to publish your project, simply put the contents into a repository and push it to GitHub or Bitbucket (other providers will be supported later). You can then register an account and register the package using your GitHub/Bitbucket user name (or organization) and the project name. Anyone who adds the name of your project as a dependency to his/her package description will automatically have the contents of your git repository available to his/her project.

Version tags

The repository will be monitored for changes and new version tags. To add a new version, just create a tag with a name of the form v1.2.3, where 1.2.3 should be changed to the actual version number. About twice per hour, the repository will be queried for new tags and any detected version will be made available on the registry.

Furthermore, all named branches will be available as special rolling versions of the form ~master (in case of the git "master" branch). However, those should never directly be used to refer to dependencies. Use those only in dub.selections.json or for version overrides ($ dub add-override).