This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sake tasks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sake task name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sake generate-xcodeproj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sake init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew tap xcodeswift/sake [email protected]:xcodeswift/sake.git | |
brew install sake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sakefile | |
import SakefileDescription | |
import SakefileUtils | |
enum Task: String, CustomStringConvertible { | |
case build | |
var description: String { | |
switch self { | |
case .build: | |
return "Builds the project" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public final class SearchBuilder { | |
private let dependenciesSolver: SearchDependencies | |
public init(dependenciesSolver: SearchDependencies) { | |
self.dependenciesSolver = dependenciesSolver | |
} | |
public func makeViewController() -> UIViewController { | |
let client = dependenciesSolver.makeClient() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public protocol SearchDependencies: BaseDependencies { | |
func makeAnalytics() -> Analytics | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AppDependencies: BaseDependencies { | |
func makeClient() -> Client { | |
return Services.client | |
} | |
func makeLogger() -> Logger { | |
return Services.logger | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public protocol BaseDependencies { | |
func makeClient() -> Client | |
func makeLogger() -> Logger | |
} |