@fto-consult/expo-ui 6.18.38 → 6.19.0
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
CHANGED
|
@@ -8,10 +8,9 @@ module.exports = function(api,opts) {
|
|
|
8
8
|
//console.log(environmentPath," is envvv ",opts);
|
|
9
9
|
const path = require("path");
|
|
10
10
|
const fs = require("fs");
|
|
11
|
-
const dir = path.resolve(__dirname);
|
|
12
11
|
typeof api.cache =='function' && api.cache(true);
|
|
13
12
|
const inlineDovOptions = { unsafe: true};
|
|
14
|
-
const options = {
|
|
13
|
+
const options = {...opts,platform:"expo"};
|
|
15
14
|
const environmentPath = require("./copy-env-file")();
|
|
16
15
|
if(fs.existsSync(environmentPath)){
|
|
17
16
|
inlineDovOptions.path ='./.env';
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import registerApp from "$expo-ui-root-path";
|
|
2
2
|
import screens from "./src/screens";
|
|
3
|
+
import drawerItems from "./src/navigation/drawerItems";
|
|
4
|
+
|
|
3
5
|
registerApp({
|
|
4
6
|
/**** application navigation */
|
|
5
7
|
navigation : {
|
|
6
8
|
//all application screeens
|
|
7
9
|
screens,
|
|
8
|
-
drawerItems
|
|
10
|
+
drawerItems, //application main drawer items
|
|
9
11
|
},
|
|
10
12
|
/**application components */
|
|
11
13
|
components : {
|
|
@@ -24,14 +26,11 @@ registerApp({
|
|
|
24
26
|
/**
|
|
25
27
|
* //when main application component is mounted
|
|
26
28
|
*/
|
|
27
|
-
onMount : function(){
|
|
28
|
-
},
|
|
29
|
+
onMount : function(){},
|
|
29
30
|
/****when main application component is unmounted*/
|
|
30
|
-
onUnmount : function(){
|
|
31
|
-
},
|
|
31
|
+
onUnmount : function(){},
|
|
32
32
|
/**** called any time main application's component is rendered */
|
|
33
|
-
onRender : function(){
|
|
34
|
-
},
|
|
33
|
+
onRender : function(){},
|
|
35
34
|
/*** if you need to wrap main application content with some custom react Provider */
|
|
36
35
|
render : ({children})=>{
|
|
37
36
|
return children;
|
package/bin/create-app.js
CHANGED
|
@@ -4,36 +4,49 @@ const createAppDir = path.resolve(__dirname,"create-app");
|
|
|
4
4
|
module.exports = function(parsedArgs,{projectRoot}){
|
|
5
5
|
const packageObj = require("../package.json");
|
|
6
6
|
const root = process.cwd(), mainPackagePath = path.resolve(root,"package.json");
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
thowError("Nom de l'application invalide. Rassurez vous d'exécuter l'application dans un répertoire valide."," package : ",mainPackage);
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
const name = String(parsedArgs.name||mainPackage.name).trim();
|
|
7
|
+
let mainPackage = fs.existsSync(mainPackagePath) && require(`${mainPackagePath}`) || null;
|
|
8
|
+
const name = String(parsedArgs.name||parsedArgs.appName || mainPackage?.name).trim();
|
|
13
9
|
if(!name){
|
|
14
10
|
return thowError(name," nom de l'application invalide, veuillez spécifier un nom d'application valide");
|
|
15
11
|
}
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
12
|
+
const cb = (pkg,)=>{
|
|
13
|
+
mainPackage = pkg && typeof pkg =='object' && pkg || mainPackage;
|
|
14
|
+
const devDpendencies = packageObj.devDependencies;
|
|
15
|
+
const deps = devDpendencies && typeof devDpendencies =="object" && Object.keys(devDpendencies).join(" ") || "";
|
|
16
|
+
new Promise((resolve,reject)=>{
|
|
17
|
+
console.log("installing dev dependencies ....");
|
|
18
|
+
return exec(`npm i -D @expo/webpack-config @expo/metro-config ${typeof deps=="string" && deps||""}`).then(resolve).catch(reject);
|
|
19
|
+
}).then(()=>{}).finally(()=>{
|
|
20
|
+
console.log("creating application .....");
|
|
21
|
+
createEntryFile(projectRoot);
|
|
22
|
+
[path.join(projectRoot,"babel.config.js"),path.join(projectRoot,"metro.config.js"),path.join(projectRoot,"webpack.config.js")].map((p)=>{
|
|
23
|
+
if(!fs.existsSync(p)){
|
|
24
|
+
const file = path.basename(p);
|
|
25
|
+
writeFile(p,fs.readFileSync(`${path.join(createAppDir,file)}`));
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
createAPPJSONFile(projectRoot,{...mainPackage,name});
|
|
29
|
+
copy(path.resolve(createAppDir,"src"),path.resolve(projectRoot,"src"),{recursive:true,overwrite:false});
|
|
30
|
+
process.exit();
|
|
32
31
|
});
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
}
|
|
33
|
+
if(!mainPackage){
|
|
34
|
+
mainPackage = {
|
|
35
|
+
name,
|
|
36
|
+
version : "1.0.0",
|
|
37
|
+
"description": "",
|
|
38
|
+
"main": "index.js",
|
|
39
|
+
scripts : {
|
|
40
|
+
start : "npx expo start -c",
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
writeFile(mainPackagePath,JSON.stringify(mainPackage,null,2));
|
|
44
|
+
exec("npm i @fto-consult/expo-ui").finally(()=>{
|
|
45
|
+
return cb(mainPackage);
|
|
46
|
+
});
|
|
47
|
+
} else {
|
|
48
|
+
return cb();
|
|
49
|
+
}
|
|
37
50
|
}
|
|
38
51
|
|
|
39
52
|
const createEntryFile = (projectRoot)=>{
|
package/bin/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fto-consult/expo-ui",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.19.0",
|
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"fix-dependencies": "expo-cli doctor --fix-dependencies",
|
|
42
42
|
"delete-node-modules": "rimraf ./**/node_modules",
|
|
43
43
|
"modifier-url-remote-git": "git remote set-url origin 'https://borispipo@github.com/borispipo/smart-eneo.git'",
|
|
44
|
-
"update": "npm i expo @emotion/native@latest react-native-big-list@latest apexcharts@latest file-saver@latest fs-extra@latest google-libphonenumber@latest @pchmn/expo-material3-theme@latest @gorhom/portal@latest @emotion/native@latest @fto-consult/common@latest react-native-blob-util react-native-gesture-handler@latest react-native-iphone-x-helper@latest react-native-mime-types@latest react-native-paper@latest react-native-safe-area-context@latest react-native-paper-dates@latest @react-navigation/native@latest @react-navigation/native-stack@latest react-native-screens@latest react-virtuoso@latest
|
|
44
|
+
"update": "npm i expo @emotion/native@latest react-native-big-list@latest apexcharts@latest file-saver@latest fs-extra@latest google-libphonenumber@latest @pchmn/expo-material3-theme@latest @gorhom/portal@latest @emotion/native@latest @fto-consult/common@latest react-native-blob-util react-native-gesture-handler@latest react-native-iphone-x-helper@latest react-native-mime-types@latest react-native-paper@latest react-native-safe-area-context@latest react-native-paper-dates@latest @react-navigation/native@latest @react-navigation/native-stack@latest react-native-screens@latest react-virtuoso@latest tippy.js@latest websql@latest xlsx@latest && npx expo install --fix"
|
|
45
45
|
},
|
|
46
46
|
"bin": {
|
|
47
47
|
"expo-ui": "./bin/index.js"
|
|
@@ -115,8 +115,7 @@
|
|
|
115
115
|
"xlsx": "^0.18.5"
|
|
116
116
|
},
|
|
117
117
|
"devDependencies": {
|
|
118
|
-
"@expo/metro-config": "
|
|
119
|
-
"@expo/webpack-config": "^18.1.2",
|
|
118
|
+
"@expo/metro-config": "latest",
|
|
120
119
|
"babel-plugin-inline-dotenv": "^1.7.0",
|
|
121
120
|
"babel-plugin-module-resolver": "^5.0.0"
|
|
122
121
|
}
|