Skip to content

Commit 1ea48e5

Browse files
authored
Merge pull request #28 from andre2007/package_suppliers
Page package suppliers added
2 parents 38ade0c + 67414e7 commit 1ea48e5

File tree

3 files changed

+44
-1
lines changed

3 files changed

+44
-1
lines changed

source/dubregistry/web.d

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,10 @@ class DubRegistryFullWebFrontend {
6767
{
6868
render!("settings.dt");
6969
}
70+
71+
@path("/package-suppliers")
72+
void getPackageSuppliers()
73+
{
74+
render!("package_suppliers.dt");
75+
}
7076
}

views/layout.inc.menu.dt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
- import std.range : empty;
1111
- import std.string : split;
1212
- import std.typecons : tuple;
13-
- auto listitems = [tuple("Packages", ["https://code.dlang.org"]), tuple("Documentation", ["Getting Started;getting_started", "Advanced Usage;advanced_usage", "Command line documentation;commandline", "Development;develop", "Package format (JSON);package-format-json", "Package format (SDLang);package-format-sdl", "Settings;settings"]), tuple("About", ["Forums;http://forum.rejectedsoftware.com/groups/rejectedsoftware.dub", "Bug tracker (website);https://github.com/dlang/dub-registry/issues", "Bug tracker (DUB);https://github.com/dlang/dub/issues", "Github repository (website);https://github.com/dlang/dub-registry", "GitHub repository (DUB);https://github.com/dlang/dub"]), tuple("Download", ["https://code.dlang.org/download"])];
13+
- auto listitems = [tuple("Packages", ["https://code.dlang.org"]), tuple("Documentation", ["Getting Started;getting_started", "Advanced Usage;advanced_usage", "Command line documentation;commandline", "Development;develop", "Package format (JSON);package-format-json", "Package format (SDLang);package-format-sdl", "Package suppliers;package-suppliers", "Settings;settings"]), tuple("About", ["Forums;http://forum.rejectedsoftware.com/groups/rejectedsoftware.dub", "Bug tracker (website);https://github.com/dlang/dub-registry/issues", "Bug tracker (DUB);https://github.com/dlang/dub/issues", "Github repository (website);https://github.com/dlang/dub-registry", "GitHub repository (DUB);https://github.com/dlang/dub"]), tuple("Download", ["https://code.dlang.org/download"])];
1414
ul
1515
- foreach(items; listitems)
1616
- if(items[1].length < 2)

views/package_suppliers.dt

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
extends layout
2+
3+
block title
4+
- auto title = "Package suppliers";
5+
6+
block body
7+
h2 Introduction
8+
9+
p Dub supports package suppliers of type Dub Registry, Maven and File System. By default, Dub will search on Dub Registry <a href="https://code.dlang.org">https://code.dlang.org</a> and hard-coded and user-set fallbacks.
10+
11+
p Package suppliers can be specified either using argument <code>--registry</code> or globally using <a href="settings">setting</a> <code>registryUrls</code>. The type of the package supplier can be specified by prefixing the URL with <code>dub+</code> for type Dub Registry, <code>mvn+</code> for type Maven or using the <code>file://</code> scheme for type File System. Without a prefix, the type Dub Registry (<code>dub+</code>) is assumed.
12+
13+
h3 Dub Registry
14+
15+
p Dub packages are registered at a <a href="https://github.com/dlang/dub-registry">Dub Registry server</a> like <a href="https://code.dlang.org">https://code.dlang.org</a>. It isn't needed to prefix the address of a Dub Registry.
16+
17+
ul
18+
li https://code.dlang.org/
19+
li dub+https://code.dlang.org/
20+
21+
h3 Maven repository
22+
23+
p Dub can retrieve dub package zip archives located within a Maven repository like Nexus or Artifactory. The registry address needs to contain the Maven repository and a group id. The dub packages needs to be stored with a common group id, the dub package name as artifact id and dub version as artifact version. The dub package zip file must have the name <code>[packageName]-[version].zip</code>.
24+
25+
p Example
26+
27+
p Dub package zip archive <code>calculator-1.0.0.zip</code> is stored on Maven repository <a href="http://localhost:8040/maven/libs-release">http://localhost:8040/maven/libs-release</a> using group id <code>dubpackages</code>. As registry address <code>mvn+http://localhost:8040/maven/libs-release/dubpackages</code> needs to be specified.
28+
29+
p <code>dub fetch [email protected] --skip-registry=all --registry=mvn+http://localhost:8040/maven/libs-release/dubpackages</code>
30+
31+
h3 File system
32+
33+
p A folder containing dub packages as zip files could be specified as registry. The zip files must have the name <code>[packageName]-[version].zip</code>.
34+
35+
ul
36+
li Linux <code>dub fetch [email protected] --skip-registry=all --registry=file:///var/dubpackages</code>
37+
li Windows <code>dub fetch [email protected] --skip-registry=all --registry=file:///c:/d/dubpackages</code>

0 commit comments

Comments
 (0)