Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(frontend): no tsc #2163

Merged
merged 2 commits into from
Mar 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion scripts/data/gen-nodetime/nodetime
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ main();
function main() {
switch (mode) {
case "ts-proto": require("ts-proto/protoc-gen-ts_proto"); return;
case "tsc": require("typescript/bin/tsc"); return;
case "sta": require("swagger-typescript-api/index"); return;
case "swagger-combine": require("swagger-combine/bin/swagger-combine"); return;
case "ibc-setup": require("@confio/relayer/build/binary/ibc-setup/index"); return;
Expand Down
18 changes: 3 additions & 15 deletions starport/pkg/cosmosgen/generate_javascript.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"github.com/tendermint/starport/starport/pkg/localfs"
"github.com/tendermint/starport/starport/pkg/nodetime/programs/sta"
tsproto "github.com/tendermint/starport/starport/pkg/nodetime/programs/ts-proto"
"github.com/tendermint/starport/starport/pkg/nodetime/programs/tsc"
"github.com/tendermint/starport/starport/pkg/protoc"
"github.com/tendermint/starport/starport/pkg/xstrings"
"golang.org/x/sync/errgroup"
Expand Down Expand Up @@ -153,8 +152,8 @@ func (g *jsGenerator) generateModule(ctx context.Context, tsprotoPluginPath, app
return err
}
}
// generate .js and .d.ts files for all ts files.
return tsc.Generate(g.g.ctx, tscConfig(storeDirPath+"/**/*.ts"))

return nil
}

func (g *jsGenerator) generateVuexModuleLoader() error {
Expand Down Expand Up @@ -209,20 +208,9 @@ func (g *jsGenerator) generateVuexModuleLoader() error {
})
}

loaderPath := filepath.Join(g.g.o.vuexStoreRootPath, "index.ts")

if err := templateVuexRoot.Write(g.g.o.vuexStoreRootPath, "", data); err != nil {
return err
}

return tsc.Generate(g.g.ctx, tscConfig(loaderPath))
}

func tscConfig(include ...string) tsc.Config {
return tsc.Config{
Include: include,
CompilerOptions: tsc.CompilerOptions{
Declaration: true,
},
}
return nil
}
3 changes: 0 additions & 3 deletions starport/pkg/nodetime/nodetime.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ const (
// CommandTSProto is https://github.com/stephenh/ts-proto.
CommandTSProto CommandName = "ts-proto"

// CommandTSC is https://github.com/microsoft/TypeScript.
CommandTSC CommandName = "tsc"

// CommandSTA is https://github.com/acacode/swagger-typescript-api.
CommandSTA CommandName = "sta"

Expand Down
86 changes: 0 additions & 86 deletions starport/pkg/nodetime/programs/tsc/tsc.go

This file was deleted.