@fto-consult/expo-ui 7.5.7 → 7.5.9

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.
@@ -110,15 +110,21 @@ module.exports = (opts)=>{
110
110
  }
111
111
  }
112
112
  const jsonPath = path.resolve(projectRoot,'package.json');
113
- if(fs.existsSync(jsonPath)){
113
+ const localElectronDir = path.resolve(dir,"electron");
114
+ const expoUIElectronPath = path.resolve(projectRoot,"electron")
115
+ if(fs.existsSync(jsonPath) && fs.existsSync(localElectronDir)){
114
116
  try {
115
- require("./electron/utils/copy")(jsonPath,path.resolve(dir,"electron","expo-ui.json"))
117
+ require("./electron/utils/copy")(jsonPath,path.resolve(localElectronDir,"expo-ui.json"))
116
118
  } catch{}
117
119
  }
120
+ const pathsSringified = JSON.stringify(electronPaths, null, "\t");
118
121
  ///on sauvegarde les chemins des fichiers utiles, qui seront utilisées par la variable electron plus tard
119
122
  try {
120
- writeFile(paths(projectRoot),JSON.stringify(electronPaths, null, "\t"));
123
+ writeFile(paths(projectRoot),pathsSringified);
121
124
  } catch{}
125
+ if(fs.existsSync(expoUIElectronPath)){
126
+ writeFile(path.resolve(expoUIElectronPath,"paths.json"),pathsSringified);
127
+ }
122
128
  r["$erealm"] = path.resolve(expo,'realm');
123
129
  if(!r.$realm){
124
130
  r.$realm = r.$erealm;
package/bin/init.js CHANGED
@@ -16,20 +16,21 @@ module.exports = ({projectRoot,electronProjectRoot,paths,pathsJSON})=>{
16
16
  if(!createDir(electronProjectRoot)){
17
17
  throw "Unable to create electron project root directory at "+electronProjectRoot;
18
18
  }
19
- const projectRootPackage = require(`${path.resolve(projectRoot,'package.json')}`);
19
+ const mPackageJSON = Object.assign({},require(`${path.resolve(projectRoot,'package.json')}`));
20
20
  const electronPackagePath = path.resolve(electronProjectRoot,"package.json");
21
21
  const electronPackageJSON = Object.assign({},fs.existsSync(electronPackagePath)? require(electronPackagePath) : {});
22
+ const projectRootPackage = {...mPackageJSON,...electronPackageJSON};
22
23
  const dependencies = require("../electron/dependencies");
23
24
  const electronProjectRootPackage = path.resolve(electronProjectRoot,"package.json");
24
25
  projectRootPackage.main = `node_modules/${mainPackageName}/electron/index.js`;
25
26
  projectRootPackage.dependencies = {...dependencies.main,...Object.assign(electronPackageJSON.dependencies)};
27
+ projectRootPackage.dependencies[mainPackage.name] = mainPackage.version;
26
28
  projectRootPackage.devDependencies = {...dependencies.dev,...Object.assign({},electronPackageJSON.devDependencies)};
27
29
  projectRootPackage.scripts = {
28
30
  "build" : `npx ${mainPackageName} electron build`,
29
31
  "start" : `npx ${mainPackageName} electron start`,
30
32
  "run-dev" : `npx ${mainPackageName} electron start`,
31
33
  "compile2start" : `npx ${mainPackageName} electron start --build`,
32
- ...electronPackageJSON,
33
34
  }
34
35
  projectRootPackage.name = projectRootPackage.name;
35
36
  projectRootPackage.realAppName = typeof projectRootPackage.realAppName =="string" && projectRootPackage.realAppName || projectRootPackage.name;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "7.5.7",
3
+ "version": "7.5.9",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "scripts": {
6
6
  "clear-npx-cache": "npx clear-npx-cache",