Closed dario-piotrowicz closed 6 months ago
Name | Link |
---|---|
Latest commit | 133ccd4d9ec86972fb728dc42f8ed9dd710827fe |
Latest deploy log | https://app.netlify.com/sites/solid-cli/deploys/65e372f209788400087f0d55 |
By the way, I work at Cloudflare and a project I am part of is our create Cloudflare cli tool: https://developers.cloudflare.com/pages/get-started/c3/
C3 generates framework projects by running their create-x commands and then adds the Cloudflare integration to them (so that they can be deployed on our platform).
We've been supporting Solid using the old create-solid
command up until now. Now that the package has changed we've noticed that we are no longer able to pass arguments to the create-solid
command, making it very difficult for us to integrate with it (in a clean and reliable manner).
So that's why I came here trying to see if there is a willingness of adding back support to CLI arguments 🤞 (by the way, one that's really fundamental for us is the project name)
Hi @dario-piotrowicz,
Thanks so much for this PR! :)
I've merged this into the add-cli-args
branch and I've switched the library for parsing command line arguments from commander
to cmd-ts
, since that's what we use for the main CLI (because it has a significantly smaller bundle size)
Would you mind verifying that this all works properly for you and does what you need it to? If so, let me know and I can merge this into main :)
Awesome! Thanks a lot @Tommypop2, I will have that a try and let you know shortly 🙂
@Tommypop2 it works great! thank you so very much! ❤️
Please feel free to merge and publish it whenever you can so that we can start using it in our CLI 🙏 ❤️
@dario-piotrowicz Just released a new version with these changes :) Feel free to make an issue or PR if you need any more changes!
@Tommypop2 thank you so very much! ❤️ 🙏
Feel free to make an issue or PR if you need any more changes!
Sure, will do! thanks so much for being so welcoming ❤️
Hi 👋
This PR proposes changes to allow
create-solid
to accept CLI argumentsAs you can see from the command's help message here:![Screenshot 2024-03-02 at 18 37 07](https://github.com/solidjs-community/solid-cli/assets/61631103/0a998573-e142-4708-a7a7-5fcc70f84590)
This allows flexibility for the user to make choices either via cli arguments or via the interactive interface.
For example, running the following will create a project without interactively asking the user for the project's name and if they want to use solidStart:
This PR introduces just a couple of CLI arguments, more can be added later, but anyways I just wanted to test the water and see if there's interest in this and if the chosen approach (using
commander
) is accepted.Please have a look and let me know what you think 🙏