Skip to content

Commit

Permalink
♻️ Add public modifier to all components
Browse files Browse the repository at this point in the history
  • Loading branch information
importre committed Jun 21, 2022
1 parent 4fb464b commit faa8ea9
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 39 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//___FILEHEADER___

enum ___FILEBASENAMEASIDENTIFIER___: Equatable {
public enum ___FILEBASENAMEASIDENTIFIER___: Equatable {
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//___FILEHEADER___

import Combine

struct ___FILEBASENAMEASIDENTIFIER___ {
public struct ___FILEBASENAMEASIDENTIFIER___ {
public init() {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

import ComposableArchitecture

typealias ___FILEBASENAMEASIDENTIFIER___ = Reducer<
public typealias ___FILEBASENAMEASIDENTIFIER___ = Reducer<
___VARIABLE_productName:identifier___State,
___VARIABLE_productName:identifier___Action,
___VARIABLE_productName:identifier___Environment
>

extension ___FILEBASENAMEASIDENTIFIER___ {
public extension ___FILEBASENAMEASIDENTIFIER___ {
init() {
self = Self
.combine(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//___FILEHEADER___

import ComposableArchitecture

struct ___FILEBASENAMEASIDENTIFIER___: Equatable {
public struct ___FILEBASENAMEASIDENTIFIER___: Equatable {
public init() {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,33 @@ import SwiftUI

// MARK: View

struct ___FILEBASENAMEASIDENTIFIER___: View {
public struct ___FILEBASENAMEASIDENTIFIER___: View {

@ObservedObject
private var viewStore: ___VARIABLE_productName:identifier___ViewStore

private let store: ___VARIABLE_productName:identifier___Store

init(store: ___VARIABLE_productName:identifier___Store) {
public init(store: ___VARIABLE_productName:identifier___Store) {
self.viewStore = ViewStore(store)
self.store = store
}

var body: some View {
Text("Hello, ___VARIABLE_productName:identifier___!")
public var body: some View {
Text("Hello, ___VARIABLE_productName:identifier___!")
}
}

// MARK: Store

typealias ___VARIABLE_productName:identifier___Store = Store<
public typealias ___VARIABLE_productName:identifier___Store = Store<
___VARIABLE_productName:identifier___State,
___VARIABLE_productName:identifier___Action
>

// MARK: ViewStore

typealias ___VARIABLE_productName:identifier___ViewStore = ViewStore<
public typealias ___VARIABLE_productName:identifier___ViewStore = ViewStore<
___VARIABLE_productName:identifier___State,
___VARIABLE_productName:identifier___Action
>
Expand All @@ -41,11 +41,8 @@ typealias ___VARIABLE_productName:identifier___ViewStore = ViewStore<
struct ___FILEBASENAMEASIDENTIFIER____Previews: PreviewProvider {

static var previews: some View {
ForEach(ColorScheme.allCases, id: \.self) { colorScheme in
___FILEBASENAMEASIDENTIFIER___(store: store)
.preferredColorScheme(colorScheme)
.previewLayout(.sizeThatFits)
}
___FILEBASENAMEASIDENTIFIER___(store: store)
.previewLayout(.sizeThatFits)
}

static let store: ___VARIABLE_productName:identifier___Store = .init(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//___FILEHEADER___

enum ___FILEBASENAMEASIDENTIFIER___: Equatable {
public enum ___FILEBASENAMEASIDENTIFIER___: Equatable {
case increase
case decrease
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//___FILEHEADER___

import Combine

struct ___FILEBASENAMEASIDENTIFIER___ {
public struct ___FILEBASENAMEASIDENTIFIER___ {
public init() {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

import ComposableArchitecture

typealias ___FILEBASENAMEASIDENTIFIER___ = Reducer<
public typealias ___FILEBASENAMEASIDENTIFIER___ = Reducer<
___VARIABLE_productName:identifier___State,
___VARIABLE_productName:identifier___Action,
___VARIABLE_productName:identifier___Environment
>

extension ___FILEBASENAMEASIDENTIFIER___ {
public extension ___FILEBASENAMEASIDENTIFIER___ {
init() {
self = Self
.combine(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
//___FILEHEADER___

import ComposableArchitecture

struct ___FILEBASENAMEASIDENTIFIER___: Equatable {
public struct ___FILEBASENAMEASIDENTIFIER___: Equatable {
var counter: Int = 0

public init(counter: Int = 0) {
self.counter = counter
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ import SwiftUI

// MARK: View

struct ___FILEBASENAMEASIDENTIFIER___: View {
public struct ___FILEBASENAMEASIDENTIFIER___: View {

@ObservedObject
private var viewStore: ___VARIABLE_productName:identifier___ViewStore

private let store: ___VARIABLE_productName:identifier___Store

init(store: ___VARIABLE_productName:identifier___Store) {
public init(store: ___VARIABLE_productName:identifier___Store) {
self.viewStore = ViewStore(store)
self.store = store
}

var body: some View {
public var body: some View {
HStack {
Button("-") { viewStore.send(.decrease) }
Text(String(viewStore.counter))
Expand All @@ -28,14 +28,14 @@ struct ___FILEBASENAMEASIDENTIFIER___: View {

// MARK: Store

typealias ___VARIABLE_productName:identifier___Store = Store<
public typealias ___VARIABLE_productName:identifier___Store = Store<
___VARIABLE_productName:identifier___State,
___VARIABLE_productName:identifier___Action
>

// MARK: ViewStore

typealias ___VARIABLE_productName:identifier___ViewStore = ViewStore<
public typealias ___VARIABLE_productName:identifier___ViewStore = ViewStore<
___VARIABLE_productName:identifier___State,
___VARIABLE_productName:identifier___Action
>
Expand All @@ -45,11 +45,8 @@ typealias ___VARIABLE_productName:identifier___ViewStore = ViewStore<
struct ___FILEBASENAMEASIDENTIFIER____Previews: PreviewProvider {

static var previews: some View {
ForEach(ColorScheme.allCases, id: \.self) { colorScheme in
___FILEBASENAMEASIDENTIFIER___(store: store)
.preferredColorScheme(colorScheme)
.previewLayout(.sizeThatFits)
}
___FILEBASENAMEASIDENTIFIER___(store: store)
.previewLayout(.sizeThatFits)
}

static let store: ___VARIABLE_productName:identifier___Store = .init(
Expand Down

0 comments on commit faa8ea9

Please sign in to comment.