@fto-consult/expo-ui 2.7.3 → 2.7.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/expo-ui-path.js +15 -2
- package/package.json +1 -1
package/expo-ui-path.js
CHANGED
|
@@ -7,7 +7,20 @@ const path = require("path");
|
|
|
7
7
|
///retourne le chemin vers le package @expo-ui
|
|
8
8
|
module.exports = function (...args){
|
|
9
9
|
const argv = require('args-parser')(process.argv);
|
|
10
|
-
|
|
10
|
+
let isBuild = false;
|
|
11
|
+
const expoUIPath = "@fto-consult/expo-ui";
|
|
12
|
+
if(typeof argv == 'object' && argv && !Array.isArray(argv)){
|
|
13
|
+
for(let i in argv){
|
|
14
|
+
i = (i+"").toLowerCase();
|
|
15
|
+
if(i.includes('build') || i.includes('production') || i.includes('export') || i.includes('android')){
|
|
16
|
+
isBuild = true;
|
|
17
|
+
break;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
if(isBuild){
|
|
22
|
+
return expoUIPath;
|
|
23
|
+
}
|
|
11
24
|
const suffix = path.join(...args);
|
|
12
25
|
const p = require("./lookup-expo-ui-path")();
|
|
13
26
|
const sep = path.sep;
|
|
@@ -18,6 +31,6 @@ module.exports = function (...args){
|
|
|
18
31
|
return path.resolve(p,suffix).replace(sep,(sep+sep));
|
|
19
32
|
}
|
|
20
33
|
}
|
|
21
|
-
return suffix ? path.join(
|
|
34
|
+
return suffix ? path.join(expoUIPath,suffix).replace(sep,"/"): expoUIPath;
|
|
22
35
|
};
|
|
23
36
|
|