@fto-consult/expo-ui 1.1.16 → 1.1.18

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/babel.config.js CHANGED
@@ -1,4 +1,5 @@
1
1
  module.exports = function(api,opts) {
2
+ require("./expo-ui-path");
2
3
  opts = typeof opts =='object' && opts ? opts : {};
3
4
  ///les chemin vers la variable d'environnement, le chemin du fichier .env,@see : https://github.com/brysgo/babel-plugin-inline-dotenv
4
5
  let environmentPath = opts.environmentPath || opts.envPath;
package/expo-ui-path.js CHANGED
@@ -25,5 +25,20 @@ const lookupForExpoUIPath = ()=>{
25
25
  }
26
26
  ///retourne le chemin vers le package @expo-ui
27
27
  module.exports = (()=>{
28
- return lookupForExpoUIPath() || "@fto-consult/expo-ui";
28
+ const p = lookupForExpoUIPath();
29
+ if(p && fs.existsSync(p)){
30
+ const expoUIPath = path.resolve(p,"expo-ui-path.js");
31
+ try {
32
+ var writeStream = fs.createWriteStream(expoUIPath);
33
+ writeStream.write("module.exports="+p+";");
34
+ writeStream.end();
35
+ } catch{
36
+ if(fs.existsSync(expoUIPath)){
37
+ try {
38
+ fs.rmSync(expoUIPath);
39
+ } catch{}
40
+ }
41
+ }
42
+ }
43
+ return "@fto-consult/expo-ui";
29
44
  })();
package/metro.config.js CHANGED
@@ -2,6 +2,7 @@ const { getDefaultConfig } = require('@expo/metro-config');
2
2
  const path = require("path");
3
3
  const isCaseSensitive = require("./is-os-case-sensitive");
4
4
  module.exports = (opts)=>{
5
+ require("./expo-ui-path");
5
6
  opts = opts && typeof opts =='object'? opts : {};
6
7
  let {dir,nodeModulesPaths,assetExts,sourceExts} = opts;
7
8
  nodeModulesPaths = Array.isArray(nodeModulesPaths)? nodeModulesPaths : [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "1.1.16",
3
+ "version": "1.1.18",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/webpack.config.js CHANGED
@@ -2,6 +2,7 @@
2
2
  const createExpoWebpackConfigAsync = require('@expo/webpack-config')
3
3
  // Expo CLI will await this method so you can optionally return a promise.
4
4
  module.exports = async function(env, argv,opts) {
5
+ require("./expo-ui-path");
5
6
  const path = require("path");
6
7
  const dir = path.resolve(__dirname);
7
8
  const fs = require("fs");