Skip to content

Commit

Permalink
Implement given type to sort, support .h and .m now
Browse files Browse the repository at this point in the history
  • Loading branch information
marcuswu0814 committed May 15, 2018
1 parent 3f5b3bd commit a852495
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Sources/ObjcImportSorter/main.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import Commander
import ObjcImportSorterCore
import Rainbow

Group {

$0.command("sort") {
ImportSorter().sort(by: .h)
$0.command("sort") { (fileType: String) in
guard let fileType = FileType(rawValue: "*." + fileType) else {
print("Wrong given type".red)
return
}

ImportSorter().sort(by: fileType)
}

}.run()

0 comments on commit a852495

Please sign in to comment.