环境变量


¥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 run test, the value of this variable will be test.

  • NODE_RUN_PACKAGE_JSON_PATH:正在处理的 package.json 的路径。

    ¥NODE_RUN_PACKAGE_JSON_PATH: The path to the package.json that is being processed.