File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ func (App) CreateBundle() {
49
49
var appName string
50
50
var deployment string
51
51
var rnDir string
52
+ var isMinifyDisabled bool
52
53
53
54
flag .StringVar (& targetVersion , "t" , "" , "Target version" )
54
55
flag .StringVar (& appName , "n" , "" , "AppName" )
@@ -58,6 +59,11 @@ func (App) CreateBundle() {
58
59
59
60
if targetVersion == "" || appName == "" || deployment == "" {
60
61
fmt .Println ("Usage: code-push-go create_bundle -t <TargetVersion> -n <AppName> -d <deployment> -p <*Optional React native project dir>" )
62
+ flag .BoolVar (& isMinifyDisabled , "no-minify" , false , "Disable minify" )
63
+ flag .Parse ()
64
+
65
+ if targetVersion == "" || appName == "" || deployment == "" {
66
+ fmt .Println ("Usage: code-push-go create_bundle -t <TargetVersion> -n <AppName> -d <deployment> -p <*Optional React native project dir> --disable-minify (*Optional)" )
61
67
return
62
68
}
63
69
log .Println ("Get app info..." )
@@ -95,6 +101,12 @@ func (App) CreateBundle() {
95
101
if osName == "android" {
96
102
jsName = "index.android.bundle"
97
103
}
104
+
105
+ minify := "true"
106
+ if isMinifyDisabled {
107
+ minify = "false"
108
+ }
109
+
98
110
cmd := exec .Command (
99
111
"npx" ,
100
112
"react-native" ,
@@ -108,7 +120,9 @@ func (App) CreateBundle() {
108
120
"--entry-file" ,
109
121
"index.js" ,
110
122
"--platform" ,
111
- osName )
123
+ osName ,
124
+ "--minify" ,
125
+ minify )
112
126
cmd .Dir = rnDir
113
127
out , err := cmd .CombinedOutput ()
114
128
if err != nil {
You can’t perform that action at this time.
0 commit comments