Skip to content

Working on this project

Eugene Lazutkin edited this page Oct 25, 2023 · 4 revisions

This project uses git submodules, so the correct way to get it is:

git clone --recursive git@github.com:uhop/node-re2.git
cd node-re2

For older versions of git:

git clone git@github.com:uhop/node-re2.git
cd node-re2
git submodule update --init --recursive

In order to build it, make sure that you have the necessary gyp dependencies for your platform, then run:

npm install

By default npm install will try to find a pre-build binary, which corresponds to a version listed in package.json. To prevent it you can update the version to something different, e.g., 2.0.0-pre, or just create a file named .development in the root of the project. This file is listed in .gitignore and will not be committed.

Because I frequently switch between modes, .gitignore lists two more versions: .developmentx and .xdevelopment, which I use to rename .development, if I don't want to rebuild the binary extension on every npm i.

If you want to refresh a dependency (e.g., google/re2):

cd vendor/re2
git checkout TAG # e.g., git checkout 2022-06-01