create-uix-app 1.4.0-rc2 → 1.4.0-rc3
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 +11 -7
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-rc3",
|
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,7 +106,7 @@ 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 {
|
@@ -123,6 +123,8 @@ if (!projectName && !reFrame && !reactNative && !reactNativeExpo) {
|
|
123
123
|
console.log("yarn cljs:release # build production bundle");
|
124
124
|
}
|
125
125
|
});
|
126
|
+
pDeps.stdout.pipe(process.stdout);
|
127
|
+
pDeps.stderr.pipe(process.stderr);
|
126
128
|
} else if (reactNative) {
|
127
129
|
const pkgjsonTmpl = JSON.parse(
|
128
130
|
fs.readFileSync(
|
@@ -228,7 +230,7 @@ app/`
|
|
228
230
|
.join("\n")
|
229
231
|
);
|
230
232
|
console.log("Installing dependencies...");
|
231
|
-
exec(`cd ${projectName} && yarn install`, (err) => {
|
233
|
+
const pDeps = exec(`cd ${projectName} && yarn install`, (err) => {
|
232
234
|
if (err) {
|
233
235
|
console.error(err);
|
234
236
|
} else {
|
@@ -240,6 +242,8 @@ app/`
|
|
240
242
|
console.log("yarn release # build production bundle");
|
241
243
|
}
|
242
244
|
});
|
245
|
+
pDeps.stdout.pipe(process.stdout);
|
246
|
+
pDeps.stderr.pipe(process.stderr);
|
243
247
|
}
|
244
248
|
});
|
245
249
|
}
|