@fto-consult/expo-ui 1.1.12 → 1.1.14
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.js +1 -1
- package/expo.metro.config.js +1 -1
- package/index.js +9 -5
- package/package.json +1 -1
- package/webpack.config.js +1 -1
package/babel.config.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module.exports = function(api,opts) {
|
|
2
2
|
const script = require("./expo-ui-current-script")(__filename);
|
|
3
3
|
if(script){
|
|
4
|
-
console.log("
|
|
4
|
+
console.log("found local babel.config.js on expo-ui dev path at ",script);
|
|
5
5
|
return require(script)(api,opts);
|
|
6
6
|
}
|
|
7
7
|
opts = typeof opts =='object' && opts ? opts : {};
|
package/expo.metro.config.js
CHANGED
|
@@ -4,7 +4,7 @@ const isCaseSensitive = require("./is-os-case-sensitive");
|
|
|
4
4
|
module.exports = (opts)=>{
|
|
5
5
|
const script = require("./expo-ui-current-script")(__filename);
|
|
6
6
|
if(script){
|
|
7
|
-
console.log("
|
|
7
|
+
console.log("found local metro-config dev file path at ",script);
|
|
8
8
|
return require(script)(opts);
|
|
9
9
|
}
|
|
10
10
|
opts = opts && typeof opts =='object'? opts : {};
|
package/index.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { registerRootComponent } from 'expo';
|
|
2
|
-
import appConfig from "$capp/config";
|
|
3
2
|
|
|
4
|
-
const isObj = x=>typeof x =='object' && x && !Array.isArray(x);
|
|
5
|
-
const defaultObj = x=> isObj(x)? x : {};
|
|
6
3
|
|
|
7
4
|
/**** initialise l'application expoUI avec les paramètres de configuration
|
|
8
5
|
* les options sont de la forme :
|
|
@@ -10,8 +7,15 @@ const defaultObj = x=> isObj(x)? x : {};
|
|
|
10
7
|
* config {object}, le fichier de configuration de l'application
|
|
11
8
|
* }
|
|
12
9
|
*/
|
|
13
|
-
export default function
|
|
14
|
-
|
|
10
|
+
export default function ExpoUIApp (options){
|
|
11
|
+
const expoUIPath = require("./expo-ui-production-path");
|
|
12
|
+
if(expoUIPath && !expoUIPath.includes("@fto-consult/")){
|
|
13
|
+
const path = (expoUIPath+"/").replace("//","/")+"src/index";
|
|
14
|
+
console.log("found local expo-ui dev index path at ",expoUIPath," is expo ui path heinn and path is ",path);
|
|
15
|
+
return require(`${path}`)(options);
|
|
16
|
+
}
|
|
17
|
+
const appConfig = require("$capp/config").default;
|
|
18
|
+
options = options && typeof options =='object' && !Array.isArray(options)? options : {};
|
|
15
19
|
const config = defaultObj(options.config);
|
|
16
20
|
appConfig.current = config;
|
|
17
21
|
registerRootComponent(require('./src/App').default(options));
|
package/package.json
CHANGED
package/webpack.config.js
CHANGED
|
@@ -4,7 +4,7 @@ const createExpoWebpackConfigAsync = require('@expo/webpack-config')
|
|
|
4
4
|
module.exports = async function(env, argv,opts) {
|
|
5
5
|
const script = require("./expo-ui-current-script")(__filename);
|
|
6
6
|
if(script){
|
|
7
|
-
console.log("
|
|
7
|
+
console.log("found local webpack.config.js on expo-ui dev path at ",script);
|
|
8
8
|
return require(script)(env, argv,opts);
|
|
9
9
|
}
|
|
10
10
|
const path = require("path");
|