@fontsource-utils/cli
TypeScript icon, indicating that this package has built-in type declarations

0.4.2 • Public • Published

Fontsource CLI

The Fontsource CLI allows users to build fontsource packages locally as well as create new packages for submissions. For metadata, it uses Google Font Metadata.

Getting Started

npm install @fontsource-utils/cli google-font-metadata

Commands

fontsource create

Builds a new fontsource package from a template for submission.

Usage

npx fontsource create

fontsource create-verify

Verifies that a fontsource package is valid and ready for submission.

Usage

npx fontsource create-verify [options]

Options

Option Description Default
-i, --id Directory to verify package e.g. ./[id] Prompts user instead
--ci Disables fancy prompts false
--cwd Sets the current working directory process.cwd()

fontsource fetch

Fetches the latest metadata from Google Fonts.

Usage

npx fontsource fetch [key] [options]
  • Key is the Google Fonts API key. If not provided, it will be read from the environment variable GOOGLE_API_KEY.

Options

Option Description Default
-f, --force Force parse all metadata without cache false

fontsource build

Builds all Google Fonts packages from the metadata generated from fontsource fetch.

Usage

npx fontsource build [...fonts] [options]
  • Fonts is a list of font ids to build. If not provided, it will build all fonts.

Options

Option Description Default
-f, --force Force rebuild all packages from scratch false
-t, --test Generate a small number of packages for testing false
--ttf Download TTF/OTF font files false

License

MIT

Package Sidebar

Install

npm i @fontsource-utils/cli

Weekly Downloads

69

Version

0.4.2

License

MIT

Unpacked Size

178 kB

Total Files

19

Last publish

Collaborators

  • jwr1
  • lotusdevshack