Problem

When dealing with large libraries including multiple files, sub-packages, and so on, dub is well-designed and easy to use. There is one target audience, however, where the user interface could be simpler: packages with only a single file.

The current choice offered is either to make one repository for every single-file package (e.g. my own embd), or to lump together several often unrelated packages into one repo (e.g. the great arsd). The former option is clunky, and the latter requires users to download and compile several modules they won't need. Another option is needed.

Solution

An SFP is a folder named example with a single file inside named example.d (not including .git, etc). Somewhere in the file will be a comment like so:

/+
dub:
 {
     ...what would be in package.json...
 }
+/

This file could be automatically generated by:

$ dub init --sfp example
    create folder example
    create file example/example.d

Questions

Here's some additional ideas:

  • Requiring that the packages be sfp/[name] in the repository?
  • Adding support for gist and dpaste?
  • An option to generate a symlink in the parent folder:
  	- example
    	  - example.d
  	- example.d -> example/example.d

School's about to start, so I'll be slow, but I'm willing to work on it.

Thoughts?
NMS