From 562db7d0879639d737d0f9b84cf2b6833345008d Mon Sep 17 00:00:00 2001 From: jakecastelli <959672929@qq.com> Date: Wed, 15 May 2024 23:52:05 +0930 Subject: [PATCH] doc: improve ninja build for --built-in-modules-path The current ninja build does not work with `--node-builtin-modules-path` flag without passing `--ninja` as it will use `make` to build from scratch again. --- doc/contributing/building-node-with-ninja.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/contributing/building-node-with-ninja.md b/doc/contributing/building-node-with-ninja.md index 01a04c3c2cfbe2..a5e89e87e6febe 100644 --- a/doc/contributing/building-node-with-ninja.md +++ b/doc/contributing/building-node-with-ninja.md @@ -7,6 +7,12 @@ doing so can be significantly quicker than using `make`. Please see [Ninja][] is supported in the Makefile. Run `./configure --ninja` to configure the project to run the regular `make` commands with Ninja. +If you wish to only modify JS layer in `lib`, you can use: + +```bash +./configure --ninja --node-builtin-modules-path "$(pwd)" +``` + For example, `make` will execute `ninja -C out/Release` internally to produce a compiled release binary, It will also execute `ln -fs out/Release/node node`, so that you can execute `./node` at