Crate lib[][src]

Modules

Constants

Functions

Builds the subcrates to get a directory that we can serve. Returns an exit code.

Checks if the user has the necessary prerequisites on their system (i.e. cargo, wasm-pack, and rollup). These can all be checked by just trying to run their binaries and looking for errors. If the user has other paths for these, they can define them under the environment variables PERSEUS_CARGO_PATH, PERSEUS_WASM_PACK_PATH, and PERSEUS_ROLLUP_PATH.

Deletes a corrupted ‘.perseus/’ directory. This qwill be called on certain error types that would leave the user with a half-finished product, which is better to delete for safety and sanity.

Prepares the user’s project by copying in the .perseus/ subcrates. We use these subcrates to do all the building/serving, we just have to execute the right commands in the CLI. We can essentially treat the subcrates themselves as a blackbox of just a folder.

Builds the subcrates to get a directory that we can serve. Returns an exit code.