Skip to content

gizmomogwai/packageinfo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Packageinfo for dlangs dub packages

Sooner or later the question of licenses of dependencies comes up. This package helps keeping an overview. See forum.dlang.org/Learn for discussion of this.

Basic Usage

Please add the following to your artifact (after dub fetch packageinfo).

preGenerateCommands "$DUB run packageinfo"
sourcePaths "source" "out/generated/packageinfo"
importPaths "source" "out/generated/packageinfo"

This will create a module in out/generated/packageinfo/packageinfo.d that contains all dependencies with selected informatiosn (name, version and license).

The information is provided as an enum, so it is possible to access it at compile time

import packageinfo;
static foreach (p; packageinfo.packages)
{
    pragma(msg, p);
}

or runtime

import std.stdio : writeln;
import packageinfo;
writeln(packageinfo.packages);

Program arguments

To select one configuration of your dub project, pass --config=CONFIGNAME to packageinfo. See the dogfood configuration in packageinfo itself as an example.

About

Simple program to extract dub dependency information.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages