Skip to main content

CLI

The package installs the glyph command. Run it with npx glyph or from a package.json script.

glyph setup​

Prepares the project: emojis/ folder, glyph.config.js file (offered), entries in .gitignore and tsconfig.json. See installation.

glyph build​

Syncs the folder with the application's emojis and generates the indexes. See syncing.

  • With a token: checks names, deletes emojis that are gone, uploads new ones, then writes list.json and emojis.d.ts (when fileIndex is on).
  • Without a token: only updates emojis.d.ts when fileIndex is on, otherwise stops with an error.
  1. In development: add your images to emojis/, then run glyph build.
  2. When deploying: run glyph build in your CI or at startup, to regenerate list.json.
  3. In the repository: commit the images, but not list.json, which is in .gitignore.
package.json
{
"scripts": {
"emojis": "glyph build"
}
}