@fto-consult/expo-ui 7.5.21 → 7.5.23
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 +11 -11
- package/electron/index.js +1 -0
- package/package.json +1 -1
package/bin/index.js
CHANGED
@@ -90,6 +90,17 @@ program.command('electron')
|
|
90
90
|
const isElectionInitialized = require("../electron/is-initialized")(electronProjectRoot);
|
91
91
|
process.env.isElectron = true;
|
92
92
|
process.env.isElectronScript = true;
|
93
|
+
const buildOutDir = path.resolve(electronProjectRoot,"dist");
|
94
|
+
const indexFile = path.resolve(buildOutDir,"index.html");
|
95
|
+
const webBuildDir = path.resolve(projectRoot,"web-build");
|
96
|
+
const packagePath = path.resolve(projectRoot,"package.json");
|
97
|
+
if(!fs.existsSync(packagePath)){
|
98
|
+
throwError("package.json file does not exist in "+projectRoot+". please make jure that your have running package script in expo root application");
|
99
|
+
}
|
100
|
+
const packageObj = require(`${packagePath}`);
|
101
|
+
const homepage = packageObj.homepage;
|
102
|
+
let cmd = undefined;
|
103
|
+
require("../electron/create-index-file")({electronProjectRoot,appName:packageObj.name});
|
93
104
|
if(!isElectionInitialized || script =='init'){
|
94
105
|
if(script !=='init'){
|
95
106
|
console.log("initializing electron application before ....");
|
@@ -112,17 +123,6 @@ program.command('electron')
|
|
112
123
|
console.warn("Logo de l'application innexistant!! Vous devez spécifier le logo de votre application, fichier ["+(logoPath)+"]")
|
113
124
|
}
|
114
125
|
}
|
115
|
-
const buildOutDir = path.resolve(electronProjectRoot,"dist");
|
116
|
-
const indexFile = path.resolve(buildOutDir,"index.html");
|
117
|
-
const webBuildDir = path.resolve(projectRoot,"web-build");
|
118
|
-
const packagePath = path.resolve(projectRoot,"package.json");
|
119
|
-
if(!fs.existsSync(packagePath)){
|
120
|
-
throwError("package.json file does not exist in "+projectRoot+". please make jure that your have running package script in expo root application");
|
121
|
-
}
|
122
|
-
const packageObj = require(`${packagePath}`);
|
123
|
-
const homepage = packageObj.homepage;
|
124
|
-
let cmd = undefined;
|
125
|
-
require("../electron/create-index-file")({electronProjectRoot,appName:packageObj.name});
|
126
126
|
const start = x=>{
|
127
127
|
return new Promise((resolve,reject)=>{
|
128
128
|
cmd = `electron "${electronProjectRoot}" --root ${electronProjectRoot} ${isValidUrl(url)? ` --url ${url}`:''}`;
|
package/electron/index.js
CHANGED
@@ -46,6 +46,7 @@ function mainExportedApp (options){
|
|
46
46
|
options.appName = typeof options.appName =="string" && options.appName ||
|
47
47
|
typeof options.packageJSON?.realAppName =='string' && options?.packageJSON?.realAppName || typeof packageJSON?.realAppName =="string" && packageJSON?.realAppName ||
|
48
48
|
typeof option?.packageJSON?.name =="string" && options?.packageJSON?.name || typeof packageJSON.name =="string" && packageJSON.name || undefined;
|
49
|
+
throw JSON.stringify(options);
|
49
50
|
return mainApp(options);
|
50
51
|
}
|
51
52
|
|