create-uix-app 1.3.0 → 1.3.1
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.
- package/package.json +1 -1
- package/src/index.js +15 -4
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
|
|
@@ -127,6 +124,20 @@ if (!projectName && !reactNative) {
|
|
127
124
|
);
|
128
125
|
|
129
126
|
fs.rmdirSync("uix-starter-react-native", { recursive: true });
|
127
|
+
|
128
|
+
const coreNs = fs.readFileSync(
|
129
|
+
path.join(process.cwd(), "src/app/core.cljs"),
|
130
|
+
"utf8"
|
131
|
+
);
|
132
|
+
fs.writeFileSync(
|
133
|
+
path.join(process.cwd(), "src/app/core.cljs"),
|
134
|
+
coreNs.replace("{{app-name}}", projectName)
|
135
|
+
);
|
136
|
+
|
137
|
+
console.log("Done.");
|
138
|
+
console.log("\n");
|
139
|
+
console.log("yarn cljs:dev # run dev build in watch mode");
|
140
|
+
console.log("yarn cljs:release # build production bundle");
|
130
141
|
} else {
|
131
142
|
const pkgjson = JSON.parse(
|
132
143
|
fs.readFileSync(
|