Support paths directly to xcassets

Pretend xcassets are files to allow top-level xcassets in the spec.
This commit is contained in:
Brandon Kase
2017-11-08 11:10:21 -08:00
parent 5789a1110a
commit 496a7cc4b0
6 changed files with 114 additions and 2 deletions
+2 -1
View File
@@ -563,7 +563,8 @@ public class PBXProjGenerator {
func getSources(sourceMetadata source: Source, path: Path, depth: Int = 0) throws -> (sourceFiles: [SourceFile], groups: [PBXGroup]) {
// if we have a file, move it to children and use the parent as the path
let (children, path) = path.isFile ?
// pretend xcassets are files
let (children, path) = path.isFile || path.extension == "xcassets" ?
([path], path.parent()) :
(try path.children().sorted(), path)