create-uix-app 1.4.0-rc2 → 1.4.0-rc4
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +4 -2
- package/src/index.js +16 -16
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.4.0-
|
4
|
+
"version": "1.4.0-rc4",
|
5
5
|
"author": {
|
6
6
|
"name": "Roman Liutikov"
|
7
7
|
},
|
@@ -12,7 +12,9 @@
|
|
12
12
|
"keywords": [
|
13
13
|
"clojurescript",
|
14
14
|
"cljs",
|
15
|
-
"uix"
|
15
|
+
"uix",
|
16
|
+
"react native",
|
17
|
+
"expo"
|
16
18
|
],
|
17
19
|
"license": "MIT",
|
18
20
|
"dependencies": {
|
package/src/index.js
CHANGED
@@ -21,7 +21,7 @@ program
|
|
21
21
|
program.parse();
|
22
22
|
|
23
23
|
const [projectName] = program.args;
|
24
|
-
const { reFrame, reactNative,
|
24
|
+
const { reFrame, reactNative, expo } = program.opts();
|
25
25
|
|
26
26
|
const masterUrl =
|
27
27
|
"https://github.com/pitch-io/uix-starter/archive/master.tar.gz";
|
@@ -36,7 +36,7 @@ let downloadUrl;
|
|
36
36
|
|
37
37
|
if (reactNative) {
|
38
38
|
downloadUrl = reactNativeUrl;
|
39
|
-
} else if (
|
39
|
+
} else if (expo) {
|
40
40
|
downloadUrl = reactNativeExpoUrl;
|
41
41
|
} else if (reFrame) {
|
42
42
|
downloadUrl = reframeUrl;
|
@@ -44,7 +44,7 @@ if (reactNative) {
|
|
44
44
|
downloadUrl = masterUrl;
|
45
45
|
}
|
46
46
|
|
47
|
-
if (!projectName && !reFrame && !reactNative && !
|
47
|
+
if (!projectName && !reFrame && !reactNative && !expo) {
|
48
48
|
program.help();
|
49
49
|
} else {
|
50
50
|
console.log(
|
@@ -66,7 +66,7 @@ if (!projectName && !reFrame && !reactNative && !reactNativeExpo) {
|
|
66
66
|
process.cwd(),
|
67
67
|
reFrame
|
68
68
|
? "uix-starter-re-frame"
|
69
|
-
:
|
69
|
+
: expo
|
70
70
|
? "uix-starter-react-native-expo"
|
71
71
|
: "uix-starter-main"
|
72
72
|
),
|
@@ -79,7 +79,7 @@ if (!projectName && !reFrame && !reactNative && !reactNativeExpo) {
|
|
79
79
|
})
|
80
80
|
)
|
81
81
|
.then(() => {
|
82
|
-
if (
|
82
|
+
if (expo) {
|
83
83
|
const pkgjson = JSON.parse(
|
84
84
|
fs.readFileSync(
|
85
85
|
path.join(process.cwd(), projectName, "package.json"),
|
@@ -106,23 +106,24 @@ if (!projectName && !reFrame && !reactNative && !reactNativeExpo) {
|
|
106
106
|
.join("\n")
|
107
107
|
);
|
108
108
|
console.log("Installing dependencies...");
|
109
|
-
exec(`cd ${projectName} && yarn install`, (err) => {
|
109
|
+
const pDeps = exec(`cd ${projectName} && yarn install`, (err) => {
|
110
110
|
if (err) {
|
111
111
|
console.error(err);
|
112
112
|
} else {
|
113
|
-
console.log("Done.");
|
114
|
-
console.log("\n");
|
115
113
|
console.log("Using:");
|
116
|
-
|
117
|
-
.
|
118
|
-
|
119
|
-
|
114
|
+
console.log(
|
115
|
+
Object.entries(pkgjson.dependencies)
|
116
|
+
.map(([k, v]) => `${k}@${v}`)
|
117
|
+
.join("\n")
|
118
|
+
);
|
120
119
|
console.log(
|
121
120
|
"yarn dev # run dev build with Expo and cljs build in watch mode"
|
122
121
|
);
|
123
122
|
console.log("yarn cljs:release # build production bundle");
|
124
123
|
}
|
125
124
|
});
|
125
|
+
pDeps.stdout.pipe(process.stdout);
|
126
|
+
pDeps.stderr.pipe(process.stderr);
|
126
127
|
} else if (reactNative) {
|
127
128
|
const pkgjsonTmpl = JSON.parse(
|
128
129
|
fs.readFileSync(
|
@@ -197,8 +198,6 @@ if (!projectName && !reFrame && !reactNative && !reactNativeExpo) {
|
|
197
198
|
app/`
|
198
199
|
);
|
199
200
|
}
|
200
|
-
|
201
|
-
console.log("Done.");
|
202
201
|
console.log("yarn cljs:dev # run dev build in watch mode");
|
203
202
|
console.log("yarn cljs:release # build production bundle");
|
204
203
|
} else {
|
@@ -228,11 +227,10 @@ app/`
|
|
228
227
|
.join("\n")
|
229
228
|
);
|
230
229
|
console.log("Installing dependencies...");
|
231
|
-
exec(`cd ${projectName} && yarn install`, (err) => {
|
230
|
+
const pDeps = exec(`cd ${projectName} && yarn install`, (err) => {
|
232
231
|
if (err) {
|
233
232
|
console.error(err);
|
234
233
|
} else {
|
235
|
-
console.log("Done.");
|
236
234
|
console.log("\n");
|
237
235
|
console.log(
|
238
236
|
"yarn dev # run dev build in watch mode with CLJS REPL"
|
@@ -240,6 +238,8 @@ app/`
|
|
240
238
|
console.log("yarn release # build production bundle");
|
241
239
|
}
|
242
240
|
});
|
241
|
+
pDeps.stdout.pipe(process.stdout);
|
242
|
+
pDeps.stderr.pipe(process.stderr);
|
243
243
|
}
|
244
244
|
});
|
245
245
|
}
|