mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2024-09-20 09:08:46 +03:00
Add back deleted public functions and deprecate (prevent breaking public API)
This commit is contained in:
parent
b144db3d70
commit
8f4c0953b3
@ -132,6 +132,12 @@ extension Project: Equatable {
|
||||
|
||||
extension Project {
|
||||
|
||||
@available(*, deprecated, message: "Use `Project.Spec` and `init(spec:basePath:)`.")
|
||||
public init(basePath: Path, jsonDictionary: JSONDictionary) throws {
|
||||
let spec = Project.Spec(relativePath: Path(), jsonDictionary: jsonDictionary)
|
||||
try self.init(spec: spec, basePath: basePath)
|
||||
}
|
||||
|
||||
public init(spec: Spec, basePath: Path) throws {
|
||||
self.basePath = basePath
|
||||
|
||||
|
@ -10,6 +10,11 @@ extension Project {
|
||||
let template = try Spec(filename: path.lastComponent, basePath: basePath)
|
||||
try self.init(spec: template, basePath: basePath)
|
||||
}
|
||||
|
||||
@available(*, deprecated, message: "Use `Project.Spec` for loading files from disk.")
|
||||
public static func loadDictionary(path: Path) throws -> JSONDictionary {
|
||||
return try Project.Spec(filename: path.lastComponent, basePath: path.parent()).jsonDictionary
|
||||
}
|
||||
}
|
||||
|
||||
protocol PathContaining {
|
||||
|
Loading…
Reference in New Issue
Block a user