Skip to content

Commit

Permalink
improve rendered files alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
ntunin committed May 7, 2021
1 parent 787ec5b commit 5d2d1be
Show file tree
Hide file tree
Showing 15 changed files with 926 additions and 923 deletions.
12 changes: 10 additions & 2 deletions .templates/rsb_generic_list_module/Code/Module.swift.stencil
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,19 @@ protocol {{ name | upperFirstLetter }}ModuleInput: ModuleInput<{{ name | upperFi
}

protocol {{ name | upperFirstLetter }}ModuleOutput: class {

func {{ name | lowerFirstLetter }}ModuleClosed(_ moduleInput: {{ name | upperFirstLetter }}ModuleInput)
}

final class {{ name | upperFirstLetter }}Module: {{ name | upperFirstLetter }}Namespace.Module {
typealias {{ name | upperFirstLetter }}ModuleDependencies = Any

{%align%}final class {{ name | upperFirstLetter }}Module: FactoryModule<{%anchor%}{{ name | upperFirstLetter }}ListItemsFactory,
{{ name | upperFirstLetter }}ViewModel,
{{ name | upperFirstLetter }}ViewController>{%endalign%} {

{%align%} typealias Presenter = {{ name | upperFirstLetter }}Module.FactoryPresenter<{%anchor%}{{ name | upperFirstLetter }}ModuleOutput> &
{{ name | upperFirstLetter }}ModuleInput &
{{ name | upperFirstLetter }}ViewOutput{%endalign%}

override func makeInput() -> BasePresenter {
{{ name | upperFirstLetter }}Presenter(state: state, dependencies: [])
}
Expand Down
19 changes: 0 additions & 19 deletions .templates/rsb_generic_list_module/Code/Namespace.swift.stencil

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

import GenericModule

final class {{ name | upperFirstLetter }}Presenter: {{ name | upperFirstLetter }}Namespace.Presenter {
final class {{ name | upperFirstLetter }}Presenter: {{ name | upperFirstLetter }}Module.Presenter {

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
import GenericModule
import CollectionViewTools

final class {{ name | upperFirstLetter }}ListItemsFactory: {{ name | upperFirstLetter }}Namespace.Factory {
{%align%}final class {{ name | upperFirstLetter }}ListItemsFactory: GenericSectionItemsFactory<{%anchor%}{{ name | upperFirstLetter }}State,
GeneralCollectionViewDiffSectionItem,
{{ name | upperFirstLetter }}ModuleDependencies,
{{ name | upperFirstLetter }}ViewOutput>{%endalign%} {

override func makeSectionItems(state: {{ name | upperFirstLetter }}State) -> [GeneralCollectionViewDiffSectionItem] {
[]
Expand Down
1 change: 0 additions & 1 deletion .templates/rsb_generic_list_module/spec.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
files:
- template: Code/Module.swift.stencil
- template: Code/Namespace.swift.stencil
- template: Code/ViewController.swift.stencil
- template: Code/ViewModel.swift.stencil
- template: Code/Presenter.swift.stencil
Expand Down
8 changes: 7 additions & 1 deletion .templates/rsb_generic_module/Code/Module.swift.stencil
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ protocol {{ name | upperFirstLetter }}ModuleOutput: class {
func {{ name | lowerFirstLetter }}ModuleClosed(_ moduleInput: {{ name | upperFirstLetter }}ModuleInput)
}

final class {{ name | upperFirstLetter }}Module: {{ name | upperFirstLetter }}Namespace.Module {
{%align%}final class {{ name | upperFirstLetter }}Module: GenericModule.Module<{%anchor%}{{ name | upperFirstLetter }}State,
{{ name | upperFirstLetter }}ViewModel,
{{ name | upperFirstLetter }}ViewController>{%endalign%} {
typealias Dependencies = Any
typealias Presenter = {{ name | upperFirstLetter }}Module.ModulePresenter<{{ name | upperFirstLetter }}ModuleOutput, Dependencies> &
{{ name | upperFirstLetter }}ModuleInput &
{{ name | upperFirstLetter }}ViewOutput

override func makeInput() -> BasePresenter {
{{ name | upperFirstLetter }}Presenter(state: state, dependencies: [])
Expand Down
16 changes: 0 additions & 16 deletions .templates/rsb_generic_module/Code/Namespace.swift.stencil

This file was deleted.

2 changes: 1 addition & 1 deletion .templates/rsb_generic_module/Code/Presenter.swift.stencil
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

import GenericModule

final class {{ name | upperFirstLetter }}Presenter: {{ name | upperFirstLetter }}Namespace.Presenter {
final class {{ name | upperFirstLetter }}Presenter: {{ name | upperFirstLetter }}Module.Presenter {

}
1 change: 0 additions & 1 deletion .templates/rsb_generic_module/spec.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
files:
- template: Code/Module.swift.stencil
- template: Code/Namespace.swift.stencil
- template: Code/ViewController.swift.stencil
- template: Code/ViewModel.swift.stencil
- template: Code/Presenter.swift.stencil
Expand Down
Loading

0 comments on commit 5d2d1be

Please sign in to comment.