-
Notifications
You must be signed in to change notification settings - Fork 168
Open
Labels
help wantedExtra attention is neededExtra attention is needed
Description
The init script supports renaming files and directories to a variable. In the example, it'll rename any instance of counter with the specified name of the project (eg directory it got created in).
It would be nice to support a prompt, probably with the syntax [[name]] and use the value of the name variable as the default.
This will allow the user to specify a different name for their program than the project name.
Once this is implement we need a follow-up issue to add a --yes flag to make sure that templates with a prompt can be installed automatically (for example on ci).
Flow
pnpm create solana-dapp@latest youtube-journal
# - pick the template
# init script runs and prompts:
> Rename instances of "counter" to: [name]
# Hitting enter will accept the default
# Entering a new value like `journal` it will use that.Init script
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed
{ "name": "your-template", "create-solana-dapp": { // Rename is a map of terms to rename "rename": { // Rename every instance of counter "counter": { // Prompt for the value, defaulting to the name of the project "to": "[[name]]", // In the following paths "paths": ["anchor", "src"], }, }, }, }