create-uix-app 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/src/index.js +11 -2
package/package.json
CHANGED
package/src/index.js
CHANGED
@@ -12,11 +12,20 @@ program
|
|
12
12
|
.name(pkg.name)
|
13
13
|
.description(pkg.description)
|
14
14
|
.version(pkg.version)
|
15
|
-
.argument("<project-name>", "directory where a project will be created")
|
15
|
+
.argument("<project-name>", "directory where a project will be created")
|
16
|
+
.option("--re-frame", "add re-frame setup");
|
16
17
|
|
17
18
|
program.parse();
|
18
19
|
|
19
20
|
const [projectName] = program.args;
|
21
|
+
const { reFrame } = program.opts();
|
22
|
+
|
23
|
+
const masterUrl =
|
24
|
+
"https://github.com/pitch-io/uix-starter/archive/master.tar.gz";
|
25
|
+
const reframeUrl =
|
26
|
+
"https://github.com/pitch-io/uix-starter/archive/re-frame.tar.gz";
|
27
|
+
|
28
|
+
const downloadUrl = reFrame ? reframeUrl : masterUrl;
|
20
29
|
|
21
30
|
if (!projectName) {
|
22
31
|
program.help();
|
@@ -25,7 +34,7 @@ if (!projectName) {
|
|
25
34
|
"Downloading project template from https://github.com/pitch-io/uix-starter..."
|
26
35
|
);
|
27
36
|
axios
|
28
|
-
.get(
|
37
|
+
.get(downloadUrl, {
|
29
38
|
responseType: "stream",
|
30
39
|
})
|
31
40
|
.then(
|