Compiler.Package
A module for loading and saving the outline and source code of
packages (projects with a package-formatted gren.json).
The outline and source files of a package.
Load from file system
Loads an entire package from disk. The provided Path needs to point to the root
directory of the package (the directory containing gren.json).
For core packages, like gren-lang/core, the sources might include JavaScript files.
The types of errors that can happen as you load a package from the file system.
Bundles
The compiler will store entire projects in compressed form in a project's
gren_packages directory. These functions will let you read and write such
files, also known as package bundles.
This reads a package off a Stream.
This gives you some flexibility as to how the package bundle is retrieved.
You can get Streams from FileSystem and HttpClient.
The sort of errors that can occur when reading a bundle off a Stream.
Save a package to a Stream.
You'll have to create the Stream yourself using FileSystem, HttpClient or some
other module.
The package will be encoded to JSON and compressed with gzip.