@fto-consult/expo-ui 6.6.3 → 6.6.5

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 +8 -13
  2. package/package.json +1 -1
package/babel.config.js CHANGED
@@ -29,13 +29,13 @@ module.exports = function(api,opts) {
29
29
  if(nodeModulesPath && fs.existsSync(nodeModulesPath) && $eelectron && fs.existsSync($eelectron)){
30
30
  const writeFilePath = path.resolve($eelectron,"utils","writeFile.js");
31
31
  if(fs.existsSync(writeFilePath)){
32
+ const writeFile = require(`${writeFilePath}`);
32
33
  //generate getTable.js file
33
34
  const generateGetTable = String(envObj.GENERATE_GET_TABLE_JS_FILE ).trim().toLowerCase();
34
35
  const willGenerateGetTableJs = generateGetTable === "false" || generateGetTable ==="0" ? false : true;
35
36
  const tableDataPath = String(envObj.TABLES_DATA_PATH);
36
37
  if(willGenerateGetTableJs && tableDataPath && fs.existsSync(tableDataPath)){
37
38
  if(fs.lstatSync(tableDataPath).isDirectory()){
38
- const path = path.resolve(tableDataPath);
39
39
  const getTableJsPath = path.resolve(tableDataPath,"getTable.js");
40
40
  let getTableJSContent = '';
41
41
  const tables = fs.readdirSync(tableDataPath);
@@ -51,21 +51,17 @@ module.exports = function(api,opts) {
51
51
  if(!indexContent || (!indexContent.includes("table") && !indexContent.includes("tableName"))){
52
52
  return;
53
53
  }
54
- getTableJSContent+=`
55
- if(tableName === "${tableName}"){
56
- return require("./${table}").default;
57
- }
58
- `;
54
+ getTableJSContent+=`\n\t\tif(tableName === "${tableName}"){return require("./${table}").default;}`;
59
55
  });
60
56
  //on génère le fichier getTable des tables data de l'application
61
57
  if(getTableJSContent){
62
58
  writeFile(getTableJsPath,`
63
- module.exports = function(tableName){
64
- if(!tableName || tyepof tableName !=="string") return null;
65
- tableName = tableName.toUpperCase().trim();
66
- ${getTableJSContent}
67
- return null;
68
- }
59
+ module.exports = function(tableName){
60
+ if(!tableName || typeof tableName !=="string") return null;
61
+ tableName = tableName.toUpperCase().trim();
62
+ ${getTableJSContent}
63
+ return null;
64
+ }
69
65
  `);
70
66
  }
71
67
  }
@@ -79,7 +75,6 @@ module.exports = function(api,opts) {
79
75
  const appexDistPath = path.resolve(nodeModulesPath,"apexcharts","dist","apexcharts.min.js");
80
76
  if(fs.existsSync(appexDistPath)){
81
77
  const jsContent = fs.readFileSync(appexDistPath, 'utf8')
82
- const writeFile = require(`${writeFilePath}`);
83
78
  //overite appex chart html file
84
79
  writeFile(appexPathHtml,`
85
80
  <html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "6.6.3",
3
+ "version": "6.6.5",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "index.js",
6
6
  "scripts": {