turbo-ignore 0.0.7 → 0.0.8
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/index.js +9 -3
- package/package.json +5 -2
package/index.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
const { exec } = require('child_process');
|
|
4
4
|
const fs = require('fs');
|
|
5
5
|
const path = require('path');
|
|
6
|
+
const { getWorkspaceRoot } = require('workspace-tools');
|
|
6
7
|
|
|
7
8
|
function searchUp(pathName, cwd) {
|
|
8
9
|
const root = path.parse(cwd).root;
|
|
@@ -25,11 +26,16 @@ function searchUp(pathName, cwd) {
|
|
|
25
26
|
return null;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
let root = searchUp('turbo.json', process.cwd());
|
|
29
30
|
|
|
30
31
|
if (!root) {
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
root = getWorkspaceRoot(process.cwd());
|
|
33
|
+
if (!root) {
|
|
34
|
+
console.error('Error: workspace root not found.');
|
|
35
|
+
} else {
|
|
36
|
+
console.error('Error: "turbo.json" not found.');
|
|
37
|
+
}
|
|
38
|
+
process.exit(0);
|
|
33
39
|
}
|
|
34
40
|
|
|
35
41
|
exec(
|
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "turbo-ignore",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": "index.js",
|
|
7
7
|
"keywords": [],
|
|
8
8
|
"author": "Jared Palmer",
|
|
9
|
-
"license": "MPL-2.0"
|
|
9
|
+
"license": "MPL-2.0",
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"workspace-tools": "^0.18.2"
|
|
12
|
+
}
|
|
10
13
|
}
|