create-uix-app 1.4.0-rc1 → 1.4.0-rc3

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 +4 -2
  2. package/src/index.js +12 -11
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-rc1",
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
@@ -16,15 +16,12 @@ program
16
16
  .argument("<project-name>", "directory where a project will be created")
17
17
  .option("--re-frame", "add re-frame setup")
18
18
  .option("--react-native", "setup in existing React Native project")
19
- .option(
20
- "--react-native-expo",
21
- "create a new React Native project using Expo"
22
- );
19
+ .option("--expo", "create a new React Native project using Expo");
23
20
 
24
21
  program.parse();
25
22
 
26
23
  const [projectName] = program.args;
27
- const { reFrame, reactNative, reactNativeExpo } = program.opts();
24
+ const { reFrame, reactNative, expo } = program.opts();
28
25
 
29
26
  const masterUrl =
30
27
  "https://github.com/pitch-io/uix-starter/archive/master.tar.gz";
@@ -39,7 +36,7 @@ let downloadUrl;
39
36
 
40
37
  if (reactNative) {
41
38
  downloadUrl = reactNativeUrl;
42
- } else if (reactNativeExpo) {
39
+ } else if (expo) {
43
40
  downloadUrl = reactNativeExpoUrl;
44
41
  } else if (reFrame) {
45
42
  downloadUrl = reframeUrl;
@@ -47,7 +44,7 @@ if (reactNative) {
47
44
  downloadUrl = masterUrl;
48
45
  }
49
46
 
50
- if (!projectName && !reFrame && !reactNative && !reactNativeExpo) {
47
+ if (!projectName && !reFrame && !reactNative && !expo) {
51
48
  program.help();
52
49
  } else {
53
50
  console.log(
@@ -69,7 +66,7 @@ if (!projectName && !reFrame && !reactNative && !reactNativeExpo) {
69
66
  process.cwd(),
70
67
  reFrame
71
68
  ? "uix-starter-re-frame"
72
- : reactNativeExpo
69
+ : expo
73
70
  ? "uix-starter-react-native-expo"
74
71
  : "uix-starter-main"
75
72
  ),
@@ -82,7 +79,7 @@ if (!projectName && !reFrame && !reactNative && !reactNativeExpo) {
82
79
  })
83
80
  )
84
81
  .then(() => {
85
- if (reactNativeExpo) {
82
+ if (expo) {
86
83
  const pkgjson = JSON.parse(
87
84
  fs.readFileSync(
88
85
  path.join(process.cwd(), projectName, "package.json"),
@@ -109,7 +106,7 @@ if (!projectName && !reFrame && !reactNative && !reactNativeExpo) {
109
106
  .join("\n")
110
107
  );
111
108
  console.log("Installing dependencies...");
112
- exec(`cd ${projectName} && yarn install`, (err) => {
109
+ const pDeps = exec(`cd ${projectName} && yarn install`, (err) => {
113
110
  if (err) {
114
111
  console.error(err);
115
112
  } else {
@@ -126,6 +123,8 @@ if (!projectName && !reFrame && !reactNative && !reactNativeExpo) {
126
123
  console.log("yarn cljs:release # build production bundle");
127
124
  }
128
125
  });
126
+ pDeps.stdout.pipe(process.stdout);
127
+ pDeps.stderr.pipe(process.stderr);
129
128
  } else if (reactNative) {
130
129
  const pkgjsonTmpl = JSON.parse(
131
130
  fs.readFileSync(
@@ -231,7 +230,7 @@ app/`
231
230
  .join("\n")
232
231
  );
233
232
  console.log("Installing dependencies...");
234
- exec(`cd ${projectName} && yarn install`, (err) => {
233
+ const pDeps = exec(`cd ${projectName} && yarn install`, (err) => {
235
234
  if (err) {
236
235
  console.error(err);
237
236
  } else {
@@ -243,6 +242,8 @@ app/`
243
242
  console.log("yarn release # build production bundle");
244
243
  }
245
244
  });
245
+ pDeps.stdout.pipe(process.stdout);
246
+ pDeps.stderr.pipe(process.stderr);
246
247
  }
247
248
  });
248
249
  }