@fto-consult/expo-ui 1.1.18 → 1.1.20
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 +0 -1
- package/expo-ui-path.js +28 -20
- package/metro.config.js +0 -1
- package/package.json +1 -1
- package/webpack.config.js +0 -11
package/babel.config.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
module.exports = function(api,opts) {
|
|
2
|
-
require("./expo-ui-path");
|
|
3
2
|
opts = typeof opts =='object' && opts ? opts : {};
|
|
4
3
|
///les chemin vers la variable d'environnement, le chemin du fichier .env,@see : https://github.com/brysgo/babel-plugin-inline-dotenv
|
|
5
4
|
let environmentPath = opts.environmentPath || opts.envPath;
|
package/expo-ui-path.js
CHANGED
|
@@ -5,6 +5,33 @@
|
|
|
5
5
|
const fs = require("fs");
|
|
6
6
|
const path = require("path");
|
|
7
7
|
const dir = path.resolve(__dirname)
|
|
8
|
+
///retourne le chemin vers le package @expo-ui
|
|
9
|
+
module.exports = function ([...args]){
|
|
10
|
+
const suffix = path.resolve(args);
|
|
11
|
+
console.log("suffix is suffix heinn ",suffix)
|
|
12
|
+
const p = lookupForExpoUIPath();
|
|
13
|
+
if(p && fs.existsSync(p)){
|
|
14
|
+
const rPath = path.resolve(p,"..");
|
|
15
|
+
const src = path.resolve(rPath,"src");
|
|
16
|
+
if(fs.existsSync(src) && fs.existsSync((path.resolve(rPath,"babel.config.js")))){
|
|
17
|
+
const expoUIPath = path.resolve(p,"expo-ui-path.js");
|
|
18
|
+
try {
|
|
19
|
+
var writeStream = fs.createWriteStream(rPath);
|
|
20
|
+
writeStream.write("module.exports=\""+(p.replace(path.sep,(path.sep+path.sep)))+(path.sep+path.sep)+"\";");
|
|
21
|
+
writeStream.end();
|
|
22
|
+
return path.resolve(p,suffix);
|
|
23
|
+
} catch{
|
|
24
|
+
if(fs.existsSync(expoUIPath)){
|
|
25
|
+
try {
|
|
26
|
+
fs.rmSync(expoUIPath);
|
|
27
|
+
} catch{}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return path.resolve("@fto-consult/expo-ui",suffix);
|
|
33
|
+
};
|
|
34
|
+
|
|
8
35
|
const lookupForExpoUIPath = ()=>{
|
|
9
36
|
let level = 4; //jusqu'à 4 niveaux
|
|
10
37
|
let expoUIPath= null;
|
|
@@ -22,23 +49,4 @@ const lookupForExpoUIPath = ()=>{
|
|
|
22
49
|
level = level-1;
|
|
23
50
|
}
|
|
24
51
|
return expoUIPath;
|
|
25
|
-
}
|
|
26
|
-
///retourne le chemin vers le package @expo-ui
|
|
27
|
-
module.exports = (()=>{
|
|
28
|
-
const p = lookupForExpoUIPath();
|
|
29
|
-
if(p && fs.existsSync(p)){
|
|
30
|
-
const expoUIPath = path.resolve(p,"expo-ui-path.js");
|
|
31
|
-
try {
|
|
32
|
-
var writeStream = fs.createWriteStream(expoUIPath);
|
|
33
|
-
writeStream.write("module.exports="+p+";");
|
|
34
|
-
writeStream.end();
|
|
35
|
-
} catch{
|
|
36
|
-
if(fs.existsSync(expoUIPath)){
|
|
37
|
-
try {
|
|
38
|
-
fs.rmSync(expoUIPath);
|
|
39
|
-
} catch{}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
return "@fto-consult/expo-ui";
|
|
44
|
-
})();
|
|
52
|
+
}
|
package/metro.config.js
CHANGED
|
@@ -2,7 +2,6 @@ const { getDefaultConfig } = require('@expo/metro-config');
|
|
|
2
2
|
const path = require("path");
|
|
3
3
|
const isCaseSensitive = require("./is-os-case-sensitive");
|
|
4
4
|
module.exports = (opts)=>{
|
|
5
|
-
require("./expo-ui-path");
|
|
6
5
|
opts = opts && typeof opts =='object'? opts : {};
|
|
7
6
|
let {dir,nodeModulesPaths,assetExts,sourceExts} = opts;
|
|
8
7
|
nodeModulesPaths = Array.isArray(nodeModulesPaths)? nodeModulesPaths : [];
|
package/package.json
CHANGED
package/webpack.config.js
CHANGED
|
@@ -2,19 +2,8 @@
|
|
|
2
2
|
const createExpoWebpackConfigAsync = require('@expo/webpack-config')
|
|
3
3
|
// Expo CLI will await this method so you can optionally return a promise.
|
|
4
4
|
module.exports = async function(env, argv,opts) {
|
|
5
|
-
require("./expo-ui-path");
|
|
6
5
|
const path = require("path");
|
|
7
6
|
const dir = path.resolve(__dirname);
|
|
8
|
-
const fs = require("fs");
|
|
9
|
-
const fileName = path.basename(__filename);
|
|
10
|
-
const expoUIPath = require("./expo-ui-path");;
|
|
11
|
-
if(expoUIPath){
|
|
12
|
-
const eP = path.resolve(expoUIPath,fileName);
|
|
13
|
-
if(fs.existsSync(eP) && eP != __filename){
|
|
14
|
-
console.log("***** loading webpack config",eP,"babel config file")
|
|
15
|
-
return require(ep)(env,argv,opts);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
7
|
opts = typeof opts =="object" && opts ? opts : {};
|
|
19
8
|
const transpileModules = Array.isArray(opts.transpileModules)? opts.transpileModules : [];
|
|
20
9
|
const config = await createExpoWebpackConfigAsync(
|