@fto-consult/expo-ui 1.1.23 → 1.1.25

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.
Files changed (2) hide show
  1. package/expo-ui-path.js +5 -4
  2. package/package.json +1 -1
package/expo-ui-path.js CHANGED
@@ -7,9 +7,10 @@ const path = require("path");
7
7
  const dir = path.resolve(__dirname)
8
8
  ///retourne le chemin vers le package @expo-ui
9
9
  module.exports = function (...args){
10
- const suffix = path.resolve(...args);
10
+ const suffix = path.join(...args);
11
11
  console.log("suffix is suffix heinn ",suffix)
12
12
  const p = lookupForExpoUIPath();
13
+ const sep = path.sep;
13
14
  if(p && fs.existsSync(p)){
14
15
  const rPath = path.resolve(p,"..");
15
16
  const src = path.resolve(rPath,"src");
@@ -17,9 +18,9 @@ module.exports = function (...args){
17
18
  const expoUIPath = path.resolve(p,"expo-ui-path.js");
18
19
  try {
19
20
  var writeStream = fs.createWriteStream(rPath);
20
- writeStream.write("module.exports=\""+(p.replace(path.sep,(path.sep+path.sep)))+(path.sep+path.sep)+"\";");
21
+ writeStream.write("module.exports=\""+(p.replace(sep,(sep+sep)))+(sep+sep)+"\";");
21
22
  writeStream.end();
22
- return path.resolve(p,suffix);
23
+ return path.resolve(p,suffix).replace(sep,(sep+sep));
23
24
  } catch{
24
25
  if(fs.existsSync(expoUIPath)){
25
26
  try {
@@ -29,7 +30,7 @@ module.exports = function (...args){
29
30
  }
30
31
  }
31
32
  }
32
- return path.resolve("@fto-consult/expo-ui",suffix);
33
+ return suffix ? path.join("@fto-consult/expo-ui",suffix).replace(sep,"/"):"@fto-consult/expo-ui";
33
34
  };
34
35
 
35
36
  const lookupForExpoUIPath = ()=>{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "1.1.23",
3
+ "version": "1.1.25",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "index.js",
6
6
  "scripts": {