@fto-consult/expo-ui 7.5.44 → 7.5.45

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/bin/index.js CHANGED
@@ -83,7 +83,7 @@ program.command('electron')
83
83
  const mainPackagePath = path.resolve(electronProjectRoot,"package.app.json");
84
84
  try {
85
85
  const mainPackageAppJSON = fs.existsSync(mainPackagePath)? require(mainPackagePath) : {};
86
- writeFile(mainPackagePath,JSON.stringify({...packageObj,...mainPackageAppJSON,icon:icon||mainPackageAppJSON.icon||undefined},null,"\t"));
86
+ writeFile(mainPackagePath,JSON.stringify({...packageObj,...mainPackageAppJSON,name:packageObj.name,icon:icon||mainPackageAppJSON.icon||undefined},null,"\t"));
87
87
  } catch{}
88
88
  }
89
89
 
package/electron/index.js CHANGED
@@ -22,18 +22,22 @@ program
22
22
 
23
23
  const programOptions = program.opts();
24
24
  const {url:pUrl,root:mainProjectRoot,icon} = programOptions;
25
- let iconPath = icon && typeof icon =="string" && fs.existsSync(path.resolve(icon)) && path.resolve(icon) || undefined;
26
- if(iconPath && fs.existsSync(path.resolve(iconPath,iconName))){
27
- iconPath = path.resolve(iconPath,iconName);
28
- }
29
25
 
30
26
  const distPath = path.join("dist",'index.html');
31
27
  const processCWD = process.cwd();
32
28
  const appPath = app.getAppPath();
33
29
  const isAsar = appPath.indexOf('app.asar') !== -1;
34
- const packageJSONPath = fs.existsSync(processCWD,"package.json")? path.resolve(processCWD,"package.json") : fs.existsSync(path.resolve(appPath,"package.app.json")) ? path.resolve(appPath,"package.app.json") : path.resolve(appPath,"package.json") ;
30
+ const packageJSONPath = fs.existsSync(path.resolve(appPath,"package.app.json")) ? path.resolve(appPath,"package.app.json") : fs.existsSync(processCWD,"package.json")? path.resolve(processCWD,"package.json") : path.resolve(appPath,"package.json") ;
35
31
  const packageJSON = fs.existsSync(packageJSONPath) ? Object.assign({},require(`${packageJSONPath}`)) : {};
36
- const appName = typeof packageJSON.realAppName =='string' && packageJSON.realAppName || typeof packageJSON.name =="string" && packageJSON.name || "";
32
+ const appName = typeof packageJSON.name =="string" && packageJSON.name || "";
33
+
34
+ let iconPath = icon && typeof icon =="string" && fs.existsSync(path.resolve(icon)) && path.resolve(icon) || undefined;
35
+ if(!iconPath && packageJSON.icon && typeof packageJSON.icon ==="string" && fs.existsSync(packageJSON.icon)){
36
+ iconPath = packageJSON.icon;
37
+ }
38
+ if(iconPath && fs.existsSync(path.resolve(iconPath,iconName))){
39
+ iconPath = path.resolve(iconPath,iconName);
40
+ }
37
41
 
38
42
  // fermee automatiquement quand l'objet JavaScript sera garbage collected.
39
43
  let mainWindow = undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "7.5.44",
3
+ "version": "7.5.45",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "scripts": {
6
6
  "clear-npx-cache": "npx clear-npx-cache",