@itwin/build-tools 4.2.0-dev.1 → 4.2.0-dev.3
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 +2 -0
- package/package.json +1 -1
- package/scripts/utils/addPackageMetadata.js +7 -4
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
@@ -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
|
11
|
-
const rootPackageJson =
|
12
|
-
|
13
|
-
|
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);
|