环境变量
¥Environment variables
使用 --run
运行脚本时设置以下环境变量:
¥The following environment variables are set when running a script with --run
:
-
NODE_RUN_SCRIPT_NAME
:正在运行的脚本的名称。例如,如果使用--run
运行test
,则此变量的值将为test
。¥
NODE_RUN_SCRIPT_NAME
: The name of the script being run. For example, if--run
is used to runtest
, the value of this variable will betest
. -
NODE_RUN_PACKAGE_JSON_PATH
:正在处理的package.json
的路径。¥
NODE_RUN_PACKAGE_JSON_PATH
: The path to thepackage.json
that is being processed.