Skip to content

Latest commit

 

History

History

scala

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Twemoji Parser Regex Generator

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.

Contributing

This document is intended as a setup guide for the regex generator; these guidelines are in addition to the overall contributor guide.

Prerequisites

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.

Building

The generator is written in Scala using Pants v1 as its build tool.

To compile, beginning from the repo root:

  1. cd src/scala
  2. ./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.

Testing

Beginning from the repo root:

  1. cd src/scala
  2. ./pants test ::

Regenerating the Regex

  1. Ensure ./src/scala/scripts/generate.sh has the correct permissions to run: chmod +x ./src/scala/scripts/generate.sh
  2. ./src/scala/scripts/generate.sh