Skip to content

Commit

Permalink
Cap first letter output dir
Browse files Browse the repository at this point in the history
  • Loading branch information
tib committed Feb 12, 2021
1 parent a38da5a commit f910be9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/SwiftTemplate/Template.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public struct Template {

public func generate(output: String) throws {
let inputPath = Path(input)
let outputPath = try Path(output).add(context.name)
let outputPath = try Path(output).add(context.name.capitalizedFirstCharacter)
let ignorePath = inputPath.child(Template.ignoreFile)
let ignoreFile = (try? String(contentsOf: ignorePath.url)) ?? ""
let ignore = ignoreFile.split(separator: "\n").map(String.init).filter { !$0.isEmpty }
Expand Down
2 changes: 1 addition & 1 deletion Tests/SwiftTemplateTests/SwiftTemplateTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ final class SwiftTemplateTests: XCTestCase {
let outputPath = Path(output)

/// check if template was created
XCTAssertEqual(outputPath.children().map(\.name), ["test"])
XCTAssertEqual(outputPath.children().map(\.name), ["Test"])

/// check if test directory was created inside the result project with the right name
let resultPath = outputPath.child("test")
Expand Down

0 comments on commit f910be9

Please sign in to comment.