@@ -51,6 +51,7 @@ func (App) CreateBundle() {
5151 var appName string
5252 var deployment string
5353 var rnDir string
54+ var isTypescriptProject bool
5455 var description string
5556 var isMinifyDisabled bool
5657 var hermes bool
@@ -61,12 +62,13 @@ func (App) CreateBundle() {
6162 flag .StringVar (& rnDir , "p" , "./" , "React native project dir" )
6263 flag .StringVar (& description , "description" , "" , "Description" )
6364 flag .BoolVar (& isMinifyDisabled , "disable-minify" , false , "Disable minify" )
65+ flag .BoolVar (& isTypescriptProject , "bundle-typescript" , false , "Bundle typescript project" )
6466 flag .BoolVar (& hermes , "hermes" , false , "Enable hermes" )
6567
6668 flag .Parse ()
6769
6870 if targetVersion == "" || appName == "" || deployment == "" {
69- fmt .Println ("Usage: code-push-go create_bundle -t <TargetVersion> -n <AppName> -d <deployment> -p <*Optional React native project dir> --description <*Optional Description> --disable-minify (*Optional) --hermes (*Optional)" )
71+ fmt .Println ("Usage: code-push-go create_bundle -t <TargetVersion> -n <AppName> -d <deployment> -p <*Optional React native project dir> --description <*Optional Description> --disable-minify (*Optional) --bundle-typescript (*Optional) -- hermes (*Optional)" )
7072 return
7173 }
7274 log .Println ("Get app info..." )
@@ -109,6 +111,12 @@ func (App) CreateBundle() {
109111 if isMinifyDisabled {
110112 minify = "false"
111113 }
114+
115+ indexFile := "index.js"
116+ if isTypescriptProject {
117+ indexFile = "index.tsx"
118+ }
119+
112120 buildUrl := rnDir + "build/CodePush"
113121 bundelUrl := buildUrl + "/" + jsName
114122 cmd := exec .Command (
@@ -122,7 +130,7 @@ func (App) CreateBundle() {
122130 "--dev" ,
123131 "false" ,
124132 "--entry-file" ,
125- "index.js" ,
133+ indexFile ,
126134 "--platform" ,
127135 osName ,
128136 "--minify" ,
0 commit comments