@fto-consult/expo-ui 6.6.4 → 6.6.6

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.
Files changed (2) hide show
  1. package/babel.config.js +10 -12
  2. package/package.json +1 -1
package/babel.config.js CHANGED
@@ -2,6 +2,8 @@ module.exports = function(api,opts) {
2
2
  opts = typeof opts =='object' && opts ? opts : {};
3
3
  api = api && typeof api =='object'? api : {};
4
4
 
5
+
6
+
5
7
  ///les chemin vers la variable d'environnement, le chemin du fichier .env,@see : https://github.com/brysgo/babel-plugin-inline-dotenv
6
8
  //console.log(environmentPath," is envvv ",opts);
7
9
  const path = require("path");
@@ -27,6 +29,7 @@ module.exports = function(api,opts) {
27
29
  if(nodeModulesPath && fs.existsSync(nodeModulesPath) && $eelectron && fs.existsSync($eelectron)){
28
30
  const writeFilePath = path.resolve($eelectron,"utils","writeFile.js");
29
31
  if(fs.existsSync(writeFilePath)){
32
+ const writeFile = require(`${writeFilePath}`);
30
33
  //generate getTable.js file
31
34
  const generateGetTable = String(envObj.GENERATE_GET_TABLE_JS_FILE ).trim().toLowerCase();
32
35
  const willGenerateGetTableJs = generateGetTable === "false" || generateGetTable ==="0" ? false : true;
@@ -48,21 +51,17 @@ module.exports = function(api,opts) {
48
51
  if(!indexContent || (!indexContent.includes("table") && !indexContent.includes("tableName"))){
49
52
  return;
50
53
  }
51
- getTableJSContent+=`
52
- if(tableName === "${tableName}"){
53
- return require("./${table}").default;
54
- }
55
- `;
54
+ getTableJSContent+=`\n\t\tif(tableName === "${tableName}"){return require("./${table}").default;}`;
56
55
  });
57
56
  //on génère le fichier getTable des tables data de l'application
58
57
  if(getTableJSContent){
59
58
  writeFile(getTableJsPath,`
60
- module.exports = function(tableName){
61
- if(!tableName || tyepof tableName !=="string") return null;
62
- tableName = tableName.toUpperCase().trim();
63
- ${getTableJSContent}
64
- return null;
65
- }
59
+ module.exports = function(tableName){
60
+ if(!tableName || typeof tableName !=="string") return null;
61
+ tableName = tableName.toUpperCase().trim();
62
+ ${getTableJSContent}
63
+ return null;
64
+ }
66
65
  `);
67
66
  }
68
67
  }
@@ -76,7 +75,6 @@ module.exports = function(api,opts) {
76
75
  const appexDistPath = path.resolve(nodeModulesPath,"apexcharts","dist","apexcharts.min.js");
77
76
  if(fs.existsSync(appexDistPath)){
78
77
  const jsContent = fs.readFileSync(appexDistPath, 'utf8')
79
- const writeFile = require(`${writeFilePath}`);
80
78
  //overite appex chart html file
81
79
  writeFile(appexPathHtml,`
82
80
  <html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "6.6.4",
3
+ "version": "6.6.6",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "index.js",
6
6
  "scripts": {