From fecb5e3f9d6c8554d92c508d916d4b1cae003744 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Tue, 22 Feb 2022 17:15:00 -0800 Subject: [PATCH] Add hint for Node.js script compatibility (#1113) --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 1f54171..065a48b 100644 --- a/README.md +++ b/README.md @@ -1847,6 +1847,14 @@ You can customize the above aliases with additional options. For example, if you alias .j='just --justfile ~/.user.justfile --working-directory ~' ``` +### Node.js `package.json` Script Compatibility + +The following export statement gives `just` recipes access to local Node module binaries, and makes `just` recipe commands behave more like `script` entries in Node.js `package.json` files: + +```make +export PATH := "./node_modules/.bin:" + env_var('PATH') +``` + ### Alternatives and Prior Art There is no shortage of command runners out there! Some more or less similar alternatives to `just` include: