Skip to content

Commit

Permalink
refactor!: remove vuex generation (#4111)
Browse files Browse the repository at this point in the history
remove vuex generation since is deprecated for a long time
  • Loading branch information
Pantani authored Apr 28, 2024
1 parent 0018c38 commit 9c8ccb0
Show file tree
Hide file tree
Showing 16 changed files with 10 additions and 713 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- [#3718](https://github.com/ignite/cli/pull/3718) Add `gen-mig-diffs` tool app to compare scaffold output of two versions of ignite
- [#4077](https://github.com/ignite/cli/pull/4077) Merge the swagger files manually instead use nodetime `swagger-combine`
- [#4100](https://github.com/ignite/cli/pull/4100) Set the `proto-dir` flag only for the `scaffold chain` command and use the proto path from the config
- [#4111](https://github.com/ignite/cli/pull/4111) Remove vuex generation

### Changes

Expand Down
1 change: 0 additions & 1 deletion ignite/cmd/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ meant to be edited by hand.

c.AddCommand(NewGenerateGo())
c.AddCommand(NewGenerateTSClient())
c.AddCommand(NewGenerateVuex())
c.AddCommand(NewGenerateComposables())
c.AddCommand(NewGenerateHooks())
c.AddCommand(NewGenerateOpenAPI())
Expand Down
56 changes: 0 additions & 56 deletions ignite/cmd/generate_vuex.go

This file was deleted.

15 changes: 0 additions & 15 deletions ignite/config/chain/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ var (
// The path is relative to the app's directory.
DefaultReactPath = "react"

// DefaultVuexPath defines the default relative path to use when generating Vuex stores for a Vue app.
// The path is relative to the app's directory.
DefaultVuexPath = "vue/src/store"

// DefaultComposablesPath defines the default relative path to use when generating useQuery composables for a Vue app.
// The path is relative to the app's directory.
DefaultComposablesPath = "vue/src/composables"
Expand Down Expand Up @@ -91,17 +87,6 @@ func TSClientPath(conf Config) string {
return DefaultTSClientPath
}

// VuexPath returns the relative path to the Vuex stores directory.
// Path is relative to the app's directory.
func VuexPath(conf *Config) string {
//nolint:staticcheck,nolintlint //ignore SA1019 until vuex config option is removed
if path := strings.TrimSpace(conf.Client.Vuex.Path); path != "" {
return filepath.Clean(path)
}

return DefaultVuexPath
}

// ComposablesPath returns the relative path to the Vue useQuery composables directory.
// Path is relative to the app's directory.
func ComposablesPath(conf *Config) string {
Expand Down
31 changes: 0 additions & 31 deletions ignite/pkg/cosmosgen/cosmosgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ type generateOptions struct {
jsOut func(module.Module) string
tsClientRootPath string

vuexOut func(module.Module) string
vuexRootPath string

composablesOut func(module.Module) string
composablesRootPath string

Expand All @@ -55,13 +52,6 @@ func WithTSClientGeneration(out ModulePathFunc, tsClientRootPath string, useCach
}
}

func WithVuexGeneration(out ModulePathFunc, vuexRootPath string) Option {
return func(o *generateOptions) {
o.vuexOut = out
o.vuexRootPath = vuexRootPath
}
}

func WithComposablesGeneration(out ModulePathFunc, composablesRootPath string) Option {
return func(o *generateOptions) {
o.composablesOut = out
Expand Down Expand Up @@ -204,27 +194,6 @@ func Generate(ctx context.Context, cacheStorage cache.Storage, appPath, protoDir
}
}

if g.opts.vuexOut != nil {
if err := g.generateVuex(); err != nil {
return err
}

// Update Vuex store dependencies when Vuex stores are generated.
// This update is required to link the "ts-client" folder so the
// package is available during development before publishing it.
if err := g.updateVuexDependencies(); err != nil {
return err
}

// Update Vue app dependencies when Vuex stores are generated.
// This update is required to link the "ts-client" folder so the
// package is available during development before publishing it.
if err := g.updateVueDependencies(); err != nil {
return err
}

}

if g.opts.composablesRootPath != "" {
if err := g.generateComposables("vue"); err != nil {
return err
Expand Down
219 changes: 0 additions & 219 deletions ignite/pkg/cosmosgen/generate_vuex.go

This file was deleted.

Loading

0 comments on commit 9c8ccb0

Please sign in to comment.