Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Go to Latest
class FrugalBuilder
import { FrugalBuilder } from "https://deno.land/x/frugal@0.2.1/packages/core/Frugal.ts";

FrugalBuilder does everything needed to build or load a Frugal instance. This class orchestrates config loading, dependency graph building, cache loading and loaders.

Constructors

new
FrugalBuilder(config: Config)

Properties

optional
_watch: boolean

Methods

Create a Frugal instance based on a given config object. This leverages cached information from previous build (some operation might be skiped if nothing has changed since the last build) :

  • dependency graph build (run each time) to gather the list of loadable modules
  • cache loading (run each time)
  • loader pass on loadable modules (some loader might partially or entirely skip some tasks based on cached info)

Load a Frugal instance based on the previous build. Everything is loaded from cache (no loader pass, no dependency graph built).

This is usefull in order to run a server needing access to a Frugal instance after a build process. The two process can be separated (a build in CI, an server in the clouds), because all the information needed to setup the Frugal instance was serialized during the build