create-uix-app 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +15 -4
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-uix-app",
3
3
  "description": "Creates a starter project for UIx web app",
4
- "version": "1.3.0",
4
+ "version": "1.3.1",
5
5
  "author": {
6
6
  "name": "Roman Liutikov"
7
7
  },
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(