readPackageRecipe

Reads a package recipe from a file.

The file format (JSON/SDLang) will be determined from the file extension.

  1. PackageRecipe readPackageRecipe(string filename, string parent, StrictMode mode)
  2. PackageRecipe readPackageRecipe(NativePath filename, string parent, StrictMode mode)
  3. PackageRecipe readPackageRecipe(NativePath filename, PackageName parent, StrictMode mode)
    readPackageRecipe
    (
    NativePath filename
    ,,
    StrictMode mode = StrictMode.Ignore
    )

Parameters

filename NativePath

NativePath of the package recipe file

parent PackageName

Optional name of the parent package (if this is a sub package)

mode StrictMode

Whether to issue errors, warning, or ignore unknown keys in dub.json

Return Value

Returns the package recipe contents

Throws

Throws an exception if an I/O or syntax error occurs

Meta