build
build(config: GlyphtConfig, baseDir: string): Promise<void>
Parameters
config: GlyphtConfig
The Glypht configuration.
baseDir: string
The directory that paths in the config are resolved relative to. For passing a config file to the CLI, this would be the directory that the config file is in. For programmatic use (e.g. calling this function from a JS build script),
import.meta.dirnameis a good choice.
Returns
Promise<void>
Takes a configuration and generates fonts and CSS, writing them to the location(s) specified in the config.
If you want to consume your Glypht config programatically from JS, instead of as a command, use this function. It's what
glypht buildcalls under the hood.