Everything in this directory helps generate the emoji regex.
Nothing in this directory ships with twemoji-parser
the JavaScript package, but it is intended to satisfy any requirements for the source of generated files being openly available.
This document is intended as a setup guide for the regex generator; these guidelines are in addition to the overall contributor guide.
You will need Java 8, Scala 2.12, and Python 3.8.
Python 3.8 must be in your PATH (see instructions for adding Python to your PATH for Unix).
This likely will not work on Windows; Pants v1 does not support Windows. Contributions enabling and maintaining Windows support for the regex generator are very welcome, including changing build tools.
The generator is written in Scala using Pants v1 as its build tool.
To compile, beginning from the repo root:
cd src/scala
./pants compile ::
It's normal for the first build to take multiple minutes. Subsequent builds should be substantially faster as the cache will be warm.
Beginning from the repo root:
cd src/scala
./pants test ::
- Ensure
./src/scala/scripts/generate.sh
has the correct permissions to run:chmod +x ./src/scala/scripts/generate.sh
./src/scala/scripts/generate.sh