Skip to content

Commit

Permalink
TypeScript バージョンを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
melpon committed Jun 27, 2024
1 parent effa527 commit e66427d
Show file tree
Hide file tree
Showing 15 changed files with 2,662 additions and 79 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
go build -o $DIR/protoc-gen-jsonif-c.exe cmd/protoc-gen-jsonif-c/main.go
go build -o $DIR/protoc-gen-jsonif-cpp.exe cmd/protoc-gen-jsonif-cpp/main.go
go build -o $DIR/protoc-gen-jsonif-unity.exe cmd/protoc-gen-jsonif-unity/main.go
go build -o $DIR/protoc-gen-jsonif-typescript.exe cmd/protoc-gen-jsonif-typescript/main.go
env:
GOOS: windows
GOARCH: amd64
Expand All @@ -33,6 +34,7 @@ jobs:
go build -o $DIR/protoc-gen-jsonif-c cmd/protoc-gen-jsonif-c/main.go
go build -o $DIR/protoc-gen-jsonif-cpp cmd/protoc-gen-jsonif-cpp/main.go
go build -o $DIR/protoc-gen-jsonif-unity cmd/protoc-gen-jsonif-unity/main.go
go build -o $DIR/protoc-gen-jsonif-typescript cmd/protoc-gen-jsonif-typescript/main.go
env:
GOOS: darwin
GOARCH: amd64
Expand All @@ -43,6 +45,7 @@ jobs:
go build -o $DIR/protoc-gen-jsonif-c cmd/protoc-gen-jsonif-c/main.go
go build -o $DIR/protoc-gen-jsonif-cpp cmd/protoc-gen-jsonif-cpp/main.go
go build -o $DIR/protoc-gen-jsonif-unity cmd/protoc-gen-jsonif-unity/main.go
go build -o $DIR/protoc-gen-jsonif-typescript cmd/protoc-gen-jsonif-typescript/main.go
env:
GOOS: darwin
GOARCH: arm64
Expand All @@ -53,6 +56,7 @@ jobs:
go build -o $DIR/protoc-gen-jsonif-c cmd/protoc-gen-jsonif-c/main.go
go build -o $DIR/protoc-gen-jsonif-cpp cmd/protoc-gen-jsonif-cpp/main.go
go build -o $DIR/protoc-gen-jsonif-unity cmd/protoc-gen-jsonif-unity/main.go
go build -o $DIR/protoc-gen-jsonif-typescript cmd/protoc-gen-jsonif-typescript/main.go
env:
GOOS: linux
GOARCH: amd64
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@
# vendor/

/_build
/_install
/_install
/test/typescript/node_modules
/test/typescript/dist
4 changes: 2 additions & 2 deletions cmd/generated/extensions.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions cmd/internal/case_conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ func ToUpperCamel(name string) string {
return strings.Join(xs, "")
}

func ToLowerCamel(name string) string {
xs := strings.Split(name, "_")
for i, x := range xs {
if len(x) != 0 {
if i == 0 {
xs[i] = strings.ToLower(x[:1]) + x[1:]
} else {
xs[i] = strings.ToUpper(x[:1]) + x[1:]
}
}
}
return strings.Join(xs, "")
}

func ToSnakeCase(name string) string {
result := ""
for i, c := range name {
Expand Down
Loading

0 comments on commit e66427d

Please # to comment.