-
-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'vapor new ProjectName --template github/url' does not set 'name:' in Package.swift #428
Comments
@marc-medley the issue is that the bare template is auto generated and doesn't have any of the information needed to be able to switch it out. See https://github.com/vapor/template/blob/main/manifest.yml and https://github.com/vapor/template/blob/main/Package.swift#L5 Updating the package manifest for |
In particular, the information appears to variables which use Mustache syntax. (TemplateScaffolder.swift) import PackageDescription
let package = Package(
name: "{{name}}",
dependencies: [
.package(url: "https://github.com/vapor/vapor.git", from: "4.83.1"),{{#fluent}}
.package(url: "https://github.com/vapor/fluent-{{fluent.db.url}}-driver.git", from: "{{fluent.db.version}}"),{{/fluent}}{{#leaf}}
If the forward looking roadmap is to generally support Mustache-based Vapor Repository Templates (or some alternative), then it would be helpful to have documentation about the process. Some areas of potential confusion:
The current Vapor toolbox is operational with either a static-can-use-as-is-repo or a variable-based-repo. The vapor new VaporHello --template https://github.com/vapor/template-bare
# Cloning template...
# Creating git repository
# Adding first commit The "a Git repository to use as a template." is appropriate as minimal information. As the items listed above are addressed, then the vapor new --help
# <name> [--template,-T] [--branch] [--output,-o] [--no-commit] [--no-git]
#
# Options:
# template The URL of a Git repository to use as a template. |
@marc-medley what's the specific request here? |
Describe the bug
vapor new ProjectName --template github/some/url
does not set Package.swiftname:
to the ProjectName.To Reproduce
Steps to reproduce the behavior:
Package.swift
:Expected behavior
I had expected the project name to be handled similar to
vapor new VaporHello -n
command.Package.swift
Environment
Additional context
Comment: Updating the Package.swift
name:
seemed like a reasonable action for the vapor toolbox. If one wants the vapor templateas-is
then a git clone or a zip download could be solid alternatives. That said, there may be other considerations that I'm not aware of.The text was updated successfully, but these errors were encountered: