@fto-consult/expo-ui 7.4.22 → 7.4.24
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 +2 -4
- package/electron/index.js +2 -2
- package/package.json +1 -1
package/bin/index.js
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
const { program } = require('commander');
|
11
11
|
const path= require("path");
|
12
12
|
const fs = require("fs");
|
13
|
-
const {createDir,electronDir,copy,exec,throwError,paths:getPaths} = require("./utils");
|
13
|
+
const {createDir,electronDir,copy,exec,throwError,paths:getPaths,writeFile} = require("./utils");
|
14
14
|
|
15
15
|
|
16
16
|
const dir = path.resolve(__dirname);
|
@@ -141,9 +141,7 @@ program.command('electron')
|
|
141
141
|
console.log("exporting expo web app ...");
|
142
142
|
try {
|
143
143
|
writeFile(packagePath,JSON.stringify({...packageObj,homepage:"./"},null,"\t"));
|
144
|
-
} catch{
|
145
|
-
|
146
|
-
}
|
144
|
+
} catch{}
|
147
145
|
cmd = "npx expo export:web";
|
148
146
|
return exec({cmd,projectRoot}).then((e)=>{
|
149
147
|
try {
|
package/electron/index.js
CHANGED
@@ -13,9 +13,9 @@ program
|
|
13
13
|
|
14
14
|
const programOptions = program.opts();
|
15
15
|
const {url:pUrl,paths:pathsJSON,root:mainProjectRoot} = programOptions
|
16
|
-
|
16
|
+
const cPaths = path.resolve("./paths.json");
|
17
17
|
const pathsJ = pathsJSON && fs.existsSync(pathsJSON) && pathsJSON.endsWith("paths.json")? pathsJSON : null;
|
18
|
-
let paths = pathsJ ? require(`${pathsJ}`) : fs.existsSync(
|
18
|
+
let paths = pathsJ ? require(`${pathsJ}`) : fs.existsSync(cPaths) ? require(cPaths) : null;
|
19
19
|
const projectRoot = mainProjectRoot && fs.existsSync(mainProjectRoot) ? mainProjectRoot : paths.projectRoot || '';
|
20
20
|
const electronProjectRoot = projectRoot && fs.existsSync(path.resolve(projectRoot,"electron")) && path.resolve(projectRoot,"electron") || null;
|
21
21
|
const ePathsJSON = path.resolve(electronProjectRoot,"paths.json");
|