-
Notifications
You must be signed in to change notification settings - Fork 16
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
feat: automate installing dependencies #20
feat: automate installing dependencies #20
Conversation
It works in principle but I am unable to understand the testing setup, so I unfortunately could not write tests |
Hi @neutrino2211 ! Super cool! I've tried it on my machine, and the command works well. Feeling good! I have some thoughts for it. Feature Requests1. Defaults to the package manager that executed create-honoI don't know if this can be done, but for example, if you run 2. Change the directoryI think I'd be happier to be in the directory I created when the command finishes. TestingYeah, I know testing it is difficult, but If we can, we should do it. @sor4chi Do you have any idea how to test this? |
I was reading the create-next-app code a while ago and noticed that I can get the package manager in |
@yutakobayashidev Nice! Then, we can do it. |
Great, I'll make those changes |
Hi, @neutrino2211 I think it's good to use execa and add E2E test. This is an example of dependencies detect of netlify cli using execa. |
@yusukebe It seems like it is impossible to change the directory of the underlying shell Although, I feel like a little message that says "To get started, run: cd project-dir && package-manager dev" after everything is done would be a good compromise |
@sor4chi Thanks, I'll look into that |
Sounds great! Let's go with it. |
@yusukebe I'm just noticing that the getting started commands for templates are not uniform across the board, so we won't be able to give users a specific command to run. And editing all templates to have some sort of conformity might be overkill for such a simple message. I want to suggest leaving it as a TODO or opening a new issue for it. |
Okay! This relates to the future of create-hono. I have some thoughts, which I will present later. In this case, I think it is enough to just display "cd" to the target directory. |
Took a while to understand how to use execa with vitest but it's all looking good now. The tests run for each package manager and the existence of a package manager specific lock file is checked. Also, it currently runs |
Awesome. It works well; the package manager that I used will be set as default! But, CI was not done and failed. Can you fix this? |
Oops, it still fails. And, in the last step, please run |
There seems to be no format:fix command, just lint:fix. Is format:fix supposed to be a prettier command? If so I can add it as a script, run it then push. |
Ah, sorry! Yeah, the command is |
Done, everything seems ok 👌 |
Thank you! But, CI is still failing. Do you know the reason? |
Oh, I see the problem. The package manager detection fails sometimes and I don't catch the errors. Sorry for all the back and forth, I'll make changes and push. |
I think this is it, crossed fingers 🤞 |
Super cool! Awesome work! Then, let's land it! Thank you very much! |
Addresses #18