@itwin/build-tools 4.2.0-dev.1 → 4.2.0-dev.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -30,6 +30,8 @@ The default behaviors of the scripts (without parameters) assume that the direct
30
30
  - package.json
31
31
  - tsconfig.json
32
32
 
33
+ If the directory structure for your package varies from this, define the NODE_PROJECT_ROOT_DIRECTORY environment variable (The RUSHSTACK_FILE_ERROR_BASE_FOLDER that also serves this function is deprecated) as the path to the directory containing your package.json file.
34
+
33
35
  The following is a list of some of the most commonly used scripts within this package:
34
36
 
35
37
  #### docs.js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/build-tools",
3
- "version": "4.2.0-dev.1",
3
+ "version": "4.2.0-dev.4",
4
4
  "description": "Bentley build tools",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -7,10 +7,13 @@ const FS = require("fs-extra");
7
7
  const path = require("path");
8
8
 
9
9
  // We cannot guarantee the folder structure of a project
10
- // so find the project root using rush env variable if available.
11
- const rootPackageJson = process.env.RUSHSTACK_FILE_ERROR_BASE_FOLDER
12
- ? path.join(process.env.RUSHSTACK_FILE_ERROR_BASE_FOLDER, "package.json")
13
- : "../../../../package.json";
10
+ // so find the project root using environment variables if available, starting with NODE_PROJECT, then RUSHSTACK.
11
+ const rootPackageJson = path.join(
12
+ process.env.NODE_PROJECT_ROOT_DIRECTORY ||
13
+ process.env.RUSHSTACK_FILE_ERROR_BASE_FOLDER ||
14
+ "../../../../",
15
+ "package.json"
16
+ );
14
17
 
15
18
  // Check if path to root package.json is valid.
16
19
  const rootPackageJsonPath = require.resolve(rootPackageJson);