@fto-consult/expo-ui 1.1.9 → 1.1.11
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/expo-ui-path.js +6 -4
- package/package.json +1 -1
package/expo-ui-path.js
CHANGED
|
@@ -12,17 +12,19 @@ const lookupForExpoUIPath = ()=>{
|
|
|
12
12
|
let rootPath = path.resolve(dir);
|
|
13
13
|
while(level>0 && !expoUIPath){
|
|
14
14
|
const p = path.resolve(rootPath,"expo-ui");
|
|
15
|
-
|
|
15
|
+
const nPath = path.resolve(rootPath,"node_modules");
|
|
16
|
+
const srcPath = path.resolve(rootPath,"src");
|
|
17
|
+
const babelPath = path.resolve(rootPath,"babel.config.js");
|
|
18
|
+
if(fs.existsSync(p) && fs.existsSync(nPath) && fs.existsSync(srcPath) && fs.existsSync(babelPath)){
|
|
16
19
|
expoUIPath = p;
|
|
17
|
-
|
|
20
|
+
return expoUIPath;
|
|
18
21
|
}
|
|
19
22
|
rootPath = path.resolve(rootPath,"..");
|
|
20
23
|
level = level-1;
|
|
21
24
|
}
|
|
22
|
-
console.log("has lookup ",expoUIPath);
|
|
23
25
|
return expoUIPath;
|
|
24
26
|
}
|
|
25
|
-
lookupForExpoUIPath();
|
|
27
|
+
console.log(lookupForExpoUIPath()," is lookup path");
|
|
26
28
|
///retourne le chemin vers le package @expo-ui
|
|
27
29
|
module.exports = (()=>{
|
|
28
30
|
const isDev = fs.existsSync(devExpoUIPath) && fs.existsSync(path.resolve(devExpoUIPath,"babel.config.alias.js"))
|