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

Ensure that an appropriate name is assigned to the generated template #1119

Merged
merged 1 commit into from
Nov 25, 2023

Conversation

jinmayamashita
Copy link
Collaborator

@jinmayamashita jinmayamashita commented Nov 16, 2023

What I did

Fixed #1118

How to test

  • Is this testable with jest or e2e?
  • Does this need an update to the documentation?

@@ -217,6 +217,8 @@ function copyCommon(appDir: string, sharedConfigDir: string) {
);

// Rewrite package.json
packageObjs.name = appDir.replace(/.*\//, "");
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be a good to let users determine the package name from the directory they specify, considering the common usage.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, I would like to implement it someday. but currently, there is no established ci testing flow to verify if the generated template is functioning correctly.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, I would like to implement it someday. but currently, there is no established ci testing flow to verify if the generated template is functioning correctly.

Yes, I had the same thought when I was cleaning the script. 😅
I think this we should consider this a high priority task

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be a good to let users determine the package name from the directory they specify, considering the common usage.

In the future, it may be better to add an additional prompt in the script to ask the user to specify the package name. There may be cases where the directory name and the package name are not the same.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created an issue #1125 for now.

@jinmayamashita jinmayamashita marked this pull request as ready for review November 16, 2023 12:35
@jinmayamashita jinmayamashita self-assigned this Nov 20, 2023
Copy link
Collaborator

@ptrkdan ptrkdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for now, but as I've written in my comment, I think it would be better to add an additional prompt for this later on.

@@ -217,6 +217,8 @@ function copyCommon(appDir: string, sharedConfigDir: string) {
);

// Rewrite package.json
packageObjs.name = appDir.replace(/.*\//, "");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, I would like to implement it someday. but currently, there is no established ci testing flow to verify if the generated template is functioning correctly.

Yes, I had the same thought when I was cleaning the script. 😅
I think this we should consider this a high priority task

@@ -217,6 +217,8 @@ function copyCommon(appDir: string, sharedConfigDir: string) {
);

// Rewrite package.json
packageObjs.name = appDir.replace(/.*\//, "");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be a good to let users determine the package name from the directory they specify, considering the common usage.

In the future, it may be better to add an additional prompt in the script to ask the user to specify the package name. There may be cases where the directory name and the package name are not the same.

@jinmayamashita
Copy link
Collaborator Author

@ptrkdan Thank you for the review! I've also created an issue, so I'll proceed with the merge for now.

@jinmayamashita jinmayamashita merged commit 76bf9bf into main Nov 25, 2023
@jinmayamashita jinmayamashita deleted the fix-naming-the-template branch November 25, 2023 13:18
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

Successfully merging this pull request may close these issues.

[BUG] The name of the generated package is not appropriate.
2 participants