Skip to content
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

How can I get the user specified name in template? #7229

Open
JoonghyunCho opened this issue Nov 2, 2023 · 2 comments
Open

How can I get the user specified name in template? #7229

JoonghyunCho opened this issue Nov 2, 2023 · 2 comments

Comments

@JoonghyunCho
Copy link

Kindly asking questions about using sourceName value in template.

Situation

I know the sourceName will be automatically updated to the safe value. (for example, test-app -> test_app)
However, I have a simple template my team authoring that needs to use the original user specified name(test-app) in just one place which is one of the sourceName spots in the template.

Question

  • How can I get and use the user specified name value in template.json or in the file?
  • How can I conditionally use this user specified name at the specific sourceName spot?
@kish14all
Copy link

Hey @JoonghyunCho, did you find any solution to get the user specified name? and do you know if we can get path as well?

@egvijayanand
Copy link
Contributor

You can use the sourceName variable as it is. That is the user-provided value.

Consult this wiki page for further details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants