@fto-consult/expo-ui 9.1.1 → 9.2.0

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.
@@ -105,15 +105,15 @@ const findLicencesMain = (options)=>{
105
105
  }
106
106
  }
107
107
 
108
- module.exports = ()=>{
108
+ module.exports = (projectRoot)=>{
109
109
  ///on génère les librairies open sources utilisées par l'application
110
- const root = path.resolve(process.cwd());
110
+ projectRoot = typeof projectRoot === "string" && fs.existsSync(path.resolve(projectRoot)) ? path.resolve(projectRoot) : process.cwd();
111
111
  const expoUI = require("../expo-ui-path")();
112
- const localNodeModule = path.resolve(root,"node_modules");
112
+ const localNodeModule = path.resolve(projectRoot,"node_modules");
113
113
  const HelpScreen = path.resolve(expoUI,"src","screens","Help");
114
114
  const outputPath = path.resolve(HelpScreen,"openLibraries.js");
115
115
  return findLicencesMain({
116
- paths : [root,path.resolve(process.cwd())],
116
+ paths : [projectRoot,path.resolve(__dirname)],
117
117
  nodeModulesPath : fs.existsSync(localNodeModule) ? localNodeModule : path.resolve(expoUI,"node_modules"),
118
118
  outputPath
119
119
  });
package/metro.config.js CHANGED
@@ -61,6 +61,8 @@ module.exports = function(opts){
61
61
 
62
62
  // Remove all console logs in production...
63
63
  config.transformer.minifierConfig.compress.drop_console = false;
64
+
65
+ require("./bin/find-licenses")(projectRoot);
64
66
 
65
67
  return config;
66
68
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "9.1.1",
3
+ "version": "9.2.0",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "react-native-paper-doc": "https://github.com/callstack/react-native-paper/tree/main/docs/docs/guides",
6
6
  "scripts": {