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.jsonandemojis.d.ts(whenfileIndexis on). - Without a token: only updates
emojis.d.tswhenfileIndexis on, otherwise stops with an error.
Recommended workflow
- In development: add your images to
emojis/, then runglyph build. - When deploying: run
glyph buildin your CI or at startup, to regeneratelist.json. - In the repository: commit the images, but not
list.json, which is in.gitignore.
package.json
{
"scripts": {
"emojis": "glyph build"
}
}