Use the Spec struct rather than dictionaries directly

This commit is contained in:
Ell Neal
2019-01-13 18:14:52 +00:00
parent c90e045bc8
commit 8928088dfe
3 changed files with 10 additions and 46 deletions
+3 -3
View File
@@ -16,11 +16,11 @@ public class SpecLoader {
}
public func loadProject(path: Path) throws -> Project {
let dictionary = try Project.loadDictionary(path: path)
let project = try Project(basePath: path.parent(), jsonDictionary: dictionary)
let template = try Project.Spec(filename: path.lastComponent, basePath: path.parent())
let project = try Project(spec: template, basePath: path.parent())
self.project = project
projectDictionary = dictionary
projectDictionary = template.jsonDictionary
return project
}