@fto-consult/expo-ui 6.64.9 → 6.64.11

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.
@@ -1,8 +1,8 @@
1
1
  import ExpoUIProvider from "$expo-ui";
2
- import screens from "./src/screens";
3
- import drawerItems from "./src/navigation/drawerItems";
4
- import Logo from "./src/components/Logo";
5
- import drawerSections from "./src/navigation/drawerSections";
2
+ import screens from "$screens";
3
+ import drawerItems from "$navigation/drawerItems";
4
+ import Logo from "$components/Logo";
5
+ import drawerSections from "$navigation/drawerSections";
6
6
 
7
7
  export default function AppMainEntry(){
8
8
  return <ExpoUIProvider
@@ -7,7 +7,7 @@ module.exports = function(api) {
7
7
  $component : path.resolve($src,"component"),
8
8
  $navigation : path.relative($src,"navigation"),
9
9
  $screens : path.resolve($src,"screens"),
10
- //your custom module resolver alias, @see : https://www.npmjs.com/package/babel-plugin-module-resolver
10
+ //...your custom module resolver alias, @see : https://www.npmjs.com/package/babel-plugin-module-resolver
11
11
  }
12
12
  return require("@fto-consult/expo-ui/babel.config")(api,{
13
13
  alias,
package/bin/create-app.js CHANGED
@@ -1,6 +1,6 @@
1
1
  const {exec,thowError,copy,writeFile,createDirSync,getDependencyVersion} = require("./utils");
2
2
  const fs = require("fs"), path = require("path");
3
- const createAppDir = path.resolve("./create-app");
3
+ const getAppDir = x=>path.resolve(__dirname,"create-app");
4
4
  module.exports = function(parsedArgs,{projectRoot:root}){
5
5
  const argvName = process.argv[3];
6
6
  const packageObj = require("../package.json");
@@ -71,14 +71,14 @@ module.exports = function(parsedArgs,{projectRoot:root}){
71
71
  console.log("creating application .....");
72
72
  ["babel.config.js","metro.config.js","webpack.config.js"].map((p)=>{
73
73
  const rP = path.join(projectRoot,p);
74
- const pp = path.join(createAppDir,p);
74
+ const pp = path.join(getAppDir(),p);
75
75
  if(!fs.existsSync(rP) && fs.existsSync(pp)){
76
76
  copy(pp,rP,{overwrite:false}).catch((e)=>{});
77
77
  }
78
78
  });
79
79
  createAPPJSONFile(projectRoot,{...mainPackage,name});
80
80
  createEntryFile(projectRoot);
81
- copy(path.resolve(createAppDir,"src"),path.resolve(projectRoot,"src"),{recursive:true,overwrite:false});
81
+ copy(path.resolve(getAppDir(),"src"),path.resolve(projectRoot,"src"),{recursive:true,overwrite:false});
82
82
  console.log("intalling dependencies ...");
83
83
  return exec(`npm install`,{projectRoot}).finally(()=>{
84
84
  setTimeout(()=>{
@@ -94,7 +94,7 @@ const defaultDevDependencies = {
94
94
  const createEntryFile = (projectRoot)=>{
95
95
  const mainEntry = path.join(projectRoot,"App.js");
96
96
  if(!fs.existsSync(mainEntry)){
97
- writeFile(mainEntry,fs.readFileSync(path.join(createAppDir,"App.js")));
97
+ writeFile(mainEntry,fs.readFileSync(path.join(getAppDir(),"App.js")));
98
98
  return true;
99
99
  }
100
100
  return false;
@@ -102,8 +102,13 @@ const createEntryFile = (projectRoot)=>{
102
102
 
103
103
  const createAPPJSONFile = (projectRoot,{name,version})=>{
104
104
  version = version ||"1.0.0";
105
- copy(path.join(createAppDir,"assets"),path.resolve(projectRoot,"assets"),{overwrite:false}).catch((e)=>{});
106
- copy(path.join(createAppDir,".gitignore"),path.resolve(projectRoot,".gitignore"),{overwrite:false}).catch((e)=>{});
105
+ copy(path.join(getAppDir(),"assets"),path.resolve(projectRoot,"assets"),{overwrite:false}).catch((e)=>{});
106
+ const gP = path.resolve(projectRoot,".gitignore"), gSpath = fs.existsSync(path.join(getAppDir(),".gitignore")) ;
107
+ if(fs.existsSync(gSpath) && !fs.existsSync(gP)){
108
+ try {
109
+ writeFile(gP,fs.readFileSync(gSpath));
110
+ } catch{};
111
+ }
107
112
  const appJSONPath = path.join(projectRoot,"app.json");
108
113
  if(!fs.existsSync(appJSONPath)){
109
114
  writeFile(appJSONPath,`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "6.64.9",
3
+ "version": "6.64.11",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "main",
6
6
  "scripts": {