diff --git a/Package.resolved b/Package.resolved index e3ed382..84739a4 100644 --- a/Package.resolved +++ b/Package.resolved @@ -37,6 +37,15 @@ "version": "1.0.1" } }, + { + "package": "plural-kit", + "repositoryURL": "https://github.com/binarybirds/plural-kit.git", + "state": { + "branch": null, + "revision": "0bbac9a39a1a89187aebb8684420ca3f10036770", + "version": "1.0.0" + } + }, { "package": "shell-kit", "repositoryURL": "https://github.com/binarybirds/shell-kit", diff --git a/Package.swift b/Package.swift index 3765236..0e55477 100644 --- a/Package.swift +++ b/Package.swift @@ -16,6 +16,7 @@ let package = Package( .package(url: "https://github.com/binarybirds/shell-kit", from: "1.0.0"), .package(url: "https://github.com/binarybirds/git-kit", from: "1.0.0"), .package(url: "https://github.com/binarybirds/build-kit", from: "1.0.0"), + .package(url: "https://github.com/binarybirds/plural-kit.git", from: "1.0.0"), ], targets: [ .target(name: "SwiftTemplateCli", dependencies: [ @@ -27,6 +28,7 @@ let package = Package( .product(name: "ShellKit", package: "shell-kit"), .product(name: "GitKit", package: "git-kit"), .product(name: "BuildKit", package: "build-kit"), + .product(name: "PluralKit", package: "plural-kit"), ]), .testTarget(name: "SwiftTemplateTests", dependencies: ["SwiftTemplate"]), ] diff --git a/Sources/SwiftTemplate/Template.swift b/Sources/SwiftTemplate/Template.swift index eab7ee7..0057a7c 100644 --- a/Sources/SwiftTemplate/Template.swift +++ b/Sources/SwiftTemplate/Template.swift @@ -8,6 +8,7 @@ import Foundation import GitKit import PathKit +import PluralKit public struct Template { @@ -54,6 +55,10 @@ public struct Template { "Name": context.name.capitalizedFirstCharacter, "NAME": context.name.uppercased(), + "names": context.name.pluralized(), + "Names": context.name.pluralized().capitalizedFirstCharacter, + "NAMES": context.name.pluralized().uppercased(), + "project": context.project, "author": context.author, "date": dateFormatter.string(from: context.date)