Skip to content

Commit

Permalink
Merge pull request #11 from vykut/modularization
Browse files Browse the repository at this point in the history
Modularization
  • Loading branch information
vykut authored Dec 11, 2023
2 parents 2822471 + b5b9b2e commit d77d01c
Show file tree
Hide file tree
Showing 56 changed files with 1,367 additions and 1,001 deletions.
414 changes: 46 additions & 368 deletions FoodSpec.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,6 @@
"version" : "6.23.0"
}
},
{
"identity" : "swift-async-algorithms",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-async-algorithms.git",
"state" : {
"revision" : "da4e36f86544cdf733a40d59b3a2267e3a7bbf36",
"version" : "1.0.0"
}
},
{
"identity" : "swift-case-paths",
"kind" : "remoteSourceControl",
Expand Down
24 changes: 0 additions & 24 deletions FoodSpec.xcodeproj/xcshareddata/xcschemes/FoodSpec.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -33,30 +33,6 @@
default = "YES">
</TestPlanReference>
</TestPlans>
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EC43E5692B175A160007CD40"
BuildableName = "FoodSpecTests.xctest"
BlueprintName = "FoodSpecTests"
ReferencedContainer = "container:FoodSpec.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EC43E5732B175A160007CD40"
BuildableName = "FoodSpecUITests.xctest"
BlueprintName = "FoodSpecUITests"
ReferencedContainer = "container:FoodSpec.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>10</integer>
<integer>11</integer>
</dict>
<key>Associations (Playground) 2.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>11</integer>
<integer>12</integer>
</dict>
<key>Associations (Playground).xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>9</integer>
<integer>10</integer>
</dict>
<key>FoodSpec-Release.xcscheme</key>
<dict>
Expand All @@ -40,21 +40,21 @@
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>13</integer>
<integer>14</integer>
</dict>
<key>MyPlayground (Playground) 2.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>14</integer>
<integer>15</integer>
</dict>
<key>MyPlayground (Playground).xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>12</integer>
<integer>13</integer>
</dict>
<key>Tools for plug-in “OpenAPIGeneratorCommand”.xcscheme</key>
<dict>
Expand All @@ -68,42 +68,42 @@
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>7</integer>
<integer>5</integer>
</dict>
<key>Tour (Playground) 2.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>8</integer>
<integer>6</integer>
</dict>
<key>Tour (Playground).xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>6</integer>
<integer>4</integer>
</dict>
<key>TransactionObserver (Playground) 1.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>4</integer>
<integer>8</integer>
</dict>
<key>TransactionObserver (Playground) 2.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>5</integer>
<integer>9</integer>
</dict>
<key>TransactionObserver (Playground).xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>3</integer>
<integer>7</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
Expand Down
21 changes: 17 additions & 4 deletions FoodSpec.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,24 @@
},
"testTargets" : [
{
"parallelizable" : true,
"target" : {
"containerPath" : "container:FoodSpec.xcodeproj",
"identifier" : "EC43E5692B175A160007CD40",
"name" : "FoodSpecTests"
"containerPath" : "container:food-spec",
"identifier" : "FoodComparisonTests",
"name" : "FoodComparisonTests"
}
},
{
"target" : {
"containerPath" : "container:food-spec",
"identifier" : "FoodListTests",
"name" : "FoodListTests"
}
},
{
"target" : {
"containerPath" : "container:food-spec",
"identifier" : "SharedTests",
"name" : "SharedTests"
}
}
],
Expand Down
28 changes: 28 additions & 0 deletions FoodSpec/App/AppFeature.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import Foundation
import ComposableArchitecture
import FoodList

@Reducer
struct AppFeature {
@ObservableState
struct State: Equatable {
var foodList: FoodListFeature.State = .init()
}

@CasePathable
enum Action {
case foodList(FoodListFeature.Action)
}

var body: some ReducerOf<Self> {
Scope(state: \.foodList, action: \.foodList) {
FoodListFeature()
}
Reduce { state, action in
switch action {
case .foodList:
return .none
}
}
}
}
25 changes: 25 additions & 0 deletions FoodSpec/App/FoodSpecApp.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import SwiftUI
import ComposableArchitecture
import FoodList

@main
struct FoodSpecApp: App {
@State var store = Store(
initialState: AppFeature.State(),
reducer: {
AppFeature()
._printChanges()
}
)

var body: some Scene {
WindowGroup {
FoodList(
store: store.scope(
state: \.foodList,
action: \.foodList
)
)
}
}
}
28 changes: 0 additions & 28 deletions FoodSpec/Food Details/FoodDetailsFeature.swift

This file was deleted.

38 changes: 0 additions & 38 deletions FoodSpec/FoodSpecApp.swift

This file was deleted.

Loading

0 comments on commit d77d01c

Please sign in to comment.