@fto-consult/expo-ui 6.64.9 → 6.64.10
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.
@@ -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
|
-
|
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
|
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(
|
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(
|
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(
|
97
|
+
writeFile(mainEntry,fs.readFileSync(path.join(getAppDir(),"App.js")));
|
98
98
|
return true;
|
99
99
|
}
|
100
100
|
return false;
|
@@ -102,8 +102,8 @@ const createEntryFile = (projectRoot)=>{
|
|
102
102
|
|
103
103
|
const createAPPJSONFile = (projectRoot,{name,version})=>{
|
104
104
|
version = version ||"1.0.0";
|
105
|
-
copy(path.join(
|
106
|
-
copy(path.join(
|
105
|
+
copy(path.join(getAppDir(),"assets"),path.resolve(projectRoot,"assets"),{overwrite:false}).catch((e)=>{});
|
106
|
+
copy(path.join(getAppDir(),".gitignore"),path.resolve(projectRoot,".gitignore"),{overwrite:false}).catch((e)=>{});
|
107
107
|
const appJSONPath = path.join(projectRoot,"app.json");
|
108
108
|
if(!fs.existsSync(appJSONPath)){
|
109
109
|
writeFile(appJSONPath,`
|