create-uix-app 1.3.0 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/src/index.js +16 -13
package/package.json
CHANGED
package/src/index.js
CHANGED
@@ -15,10 +15,7 @@ program
|
|
15
15
|
.version(pkg.version)
|
16
16
|
.argument("<project-name>", "directory where a project will be created")
|
17
17
|
.option("--re-frame", "add re-frame setup")
|
18
|
-
.option(
|
19
|
-
"--react-native <app-name>",
|
20
|
-
"setup in existing React Native project"
|
21
|
-
);
|
18
|
+
.option("--react-native", "setup in existing React Native project");
|
22
19
|
|
23
20
|
program.parse();
|
24
21
|
|
@@ -81,14 +78,7 @@ if (!projectName && !reactNative) {
|
|
81
78
|
)
|
82
79
|
);
|
83
80
|
const pkgjsonPrjct = JSON.parse(
|
84
|
-
fs.readFileSync(
|
85
|
-
path.join(
|
86
|
-
process.cwd(),
|
87
|
-
"uix-starter-react-native",
|
88
|
-
"package.json"
|
89
|
-
),
|
90
|
-
"utf8"
|
91
|
-
)
|
81
|
+
fs.readFileSync(path.join(process.cwd(), "package.json"), "utf8")
|
92
82
|
);
|
93
83
|
|
94
84
|
// update package.json
|
@@ -126,7 +116,20 @@ if (!projectName && !reactNative) {
|
|
126
116
|
path.join(process.cwd(), "shadow-cljs.edn")
|
127
117
|
);
|
128
118
|
|
129
|
-
fs.
|
119
|
+
fs.rmSync("uix-starter-react-native", { recursive: true });
|
120
|
+
|
121
|
+
const coreNs = fs.readFileSync(
|
122
|
+
path.join(process.cwd(), "src/app/core.cljs"),
|
123
|
+
"utf8"
|
124
|
+
);
|
125
|
+
fs.writeFileSync(
|
126
|
+
path.join(process.cwd(), "src/app/core.cljs"),
|
127
|
+
coreNs.replace("{{app-name}}", projectName)
|
128
|
+
);
|
129
|
+
|
130
|
+
console.log("Done.");
|
131
|
+
console.log("yarn cljs:dev # run dev build in watch mode");
|
132
|
+
console.log("yarn cljs:release # build production bundle");
|
130
133
|
} else {
|
131
134
|
const pkgjson = JSON.parse(
|
132
135
|
fs.readFileSync(
|