Skip to content

Commit

Permalink
feat(frontend): no tsc (#2163)
Browse files Browse the repository at this point in the history
* removed tsc

* Update scripts/data/gen-nodetime/package.json

Co-authored-by: İlker G. Öztürk <ilkergoktugozturk@gmail.com>
  • Loading branch information
marinhoarthur and ilgooz committed Mar 17, 2022
1 parent f86b7ae commit cdb5b95
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 105 deletions.
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.

0 comments on commit cdb5b95

Please sign in to comment.