@fto-consult/expo-ui 7.4.8 → 7.4.10
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.alias.js +3 -1
- package/bin/index.js +2 -2
- package/bin/init.js +8 -2
- package/electron/utils/paths.js +1 -1
- package/package.json +1 -1
package/babel.config.alias.js
CHANGED
@@ -115,7 +115,9 @@ module.exports = (opts)=>{
|
|
115
115
|
} catch{}
|
116
116
|
}
|
117
117
|
///on sauvegarde les chemins des fichiers utiles, qui seront utilisées par la variable electron plus tard
|
118
|
-
|
118
|
+
try {
|
119
|
+
writeFile(paths(projectRoot),JSON.stringify(electronPaths, null, "\t"));
|
120
|
+
} catch{}
|
119
121
|
r["$erealm"] = path.resolve(expo,'realm');
|
120
122
|
if(!r.$realm){
|
121
123
|
r.$realm = r.$erealm;
|
package/bin/index.js
CHANGED
@@ -46,7 +46,7 @@ program.command('electron')
|
|
46
46
|
.argument('<cmd>', 'la commande à exécuter (start,init,build)')
|
47
47
|
//.option('-r, --project-root [dir]', 'le project root de l\'application')
|
48
48
|
.option('-c, --config [dir]', 'le chemin (relatif au project root) du fichier de configuration de l\'application electron')
|
49
|
-
|
49
|
+
//.option('-s, --splash [dir]', 'le chemin (relatif au project root) du fichier du splash screen de l\'application')
|
50
50
|
.option('-o, --out [dir]', 'le chemin (relatif au project root) du répertoire qui contiendra les fichiers build')
|
51
51
|
.option('-u, --url [url]', 'le lien url qui sera ouvert par l\'application')
|
52
52
|
.option('-i, --compile [url]', 'le lien url qui sera ouvert par l\'application')
|
@@ -59,7 +59,7 @@ program.command('electron')
|
|
59
59
|
if(projectRoot == dir){
|
60
60
|
throwError(`Invalid project root ${projectRoot}; project root must be different to ${dir}`);
|
61
61
|
}
|
62
|
-
const pathsJSON = path.resolve(
|
62
|
+
const pathsJSON = path.resolve(getPaths(projectRoot));
|
63
63
|
if(!fs.existsSync(pathsJSON)){
|
64
64
|
throwError("Le fichier des chemins d'accès à l'application est innexistant, rassurez vous de tester l'application en environnement web, via la cmde <npx expo start>, avant l'exécution du script electron.");
|
65
65
|
}
|
package/bin/init.js
CHANGED
@@ -59,9 +59,15 @@ module.exports = ({projectRoot,electronProjectRoot,paths,pathsJSON})=>{
|
|
59
59
|
/**** copying all electron utils files */
|
60
60
|
const utilsPath = path.resolve(electronProjectRoot,"utils");
|
61
61
|
copy(path.resolve(electronDir,"utils"),utilsPath);
|
62
|
-
|
62
|
+
const destPathJSON = path.resolve(electronProjectRoot,"paths.json");
|
63
|
+
try {
|
64
|
+
if(paths && typeof paths =='object' && paths.$src && fs.existsSync(paths.$src)){
|
65
|
+
writeFile(destPathJSON,JSON.stringify(paths, null, "\t"));
|
66
|
+
}
|
67
|
+
} catch{}
|
68
|
+
if(!fs.existsSync(destPathJSON) && pathsJSON && fs.existsSync(pathsJSON)){
|
63
69
|
try {
|
64
|
-
copy(pathsJSON,
|
70
|
+
copy(pathsJSON,destPathJSON);
|
65
71
|
} catch(e){}
|
66
72
|
}
|
67
73
|
console.log("installing package dependencies ...");
|
package/electron/utils/paths.js
CHANGED
@@ -8,5 +8,5 @@ const path = require("path");
|
|
8
8
|
module.exports = (projectRoot)=>{
|
9
9
|
projectRoot = projectRoot && fs.existsSync(projectRoot) && projectRoot || process.cwd();
|
10
10
|
const mainPackage = require("../../package.json");
|
11
|
-
return path.resolve(projectRoot,"node_modules",mainPackage.name,
|
11
|
+
return path.resolve(projectRoot,"node_modules","@fto-consult",`${mainPackage.name.toLowerCase().replace(/\s/g, '')}.paths.json`);
|
12
12
|
}
|