parsePackageRecipe

Parses an in-memory package recipe.

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

parsePackageRecipe
(
string contents
,
string filename
,
string parent_name = null
)

Parameters

contents string

The contents of the recipe file

filename string

Name associated with the package recipe - this is only used to determine the file format from the file extension

parent_name string

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

Return Value

Returns the package recipe contents

Throws

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

Meta