Am 21.10.2013 06:20, schrieb Joseph Rushton Wakeling:

On Mon, 21 Oct 2013 04:08:02 GMT, Joseph Rushton Wakeling wrote:

Is there a recommended way to specify in package.json that a package should (or could) be treated as a "header library", where dependent code should just build stuff in via module imports, rather than via linking in a prebuilt library?

I noticed the "sourceLibrary" target option listed among the available target types, but when I try using it, issuing a "dub build" command results in "Error: Assertion failure"

I'll look into the assertion failure, it's probably a missing error
message along the lines of "The target type is 'sourceLibrary', which
has no target. Stopping build.", or did you invoke the "dub build " on a
dependent project?

But what you can do, assuming that you only have files that need not
be compiled, is to set "targetType": "sourceLibrary" and then put all
files in an "import" folder instead of "source", or manually set
"sourcePaths": [] to avoid compiling them.

If you have a mixture of files, just put those into an "import" folder
which don't need to be compiled up front. The target type in this case
can be the default "library".