-
Notifications
You must be signed in to change notification settings - Fork 40
feat: display next steps after running the adders #409
Conversation
commit: @svelte-add/core
@svelte-add/drizzle
@svelte-add/bootstrap
@svelte-add/bulma
@svelte-add/mdsvex
@svelte-add/routify
@svelte-add/storybook
@svelte-add/tailwindcss
svelte-add
@svelte-add/testing-library
@svelte-add/website
|
I actually just removed the docs links for each integration from |
I think it could be a dependency. Since
I don't think there necessarily has to be one for every adder, but the kind of thing I think of as being a next step could be something that we think we can't automatically configure, but really should be configured. Like maybe for Drizzle we could suggest where to put the database credentials for your production database |
playing around with it, I do see @benmccann's point in that it can clutter things up when it's printed by default. if a certain adder really needs the user read the docs, they can just print it themselves in
having
if not, then perhaps we can also supply them with utilities that can help with formatting to help keep consistent across adders (bulleted lists, numbered lists, padding, etc).
having
I don't think most adders should have a Edit:
oh, is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left suggested changes that demos returning a string array and auto-formats them in nextSteps
. just something to try out if we want to go in this direction
🦋 Changeset detectedLatest commit: 2414990 The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Thanks for the feedback! I really liked the idea that nextSteps: ({ options, cwd, colors, docs }) => {
var steps = ["this is a test next step other", "cwd: " + cwd, "select sass: " + colors.green(options.useSass.toString())];
if (docs) steps.push("docs: " + colors.cyan(docs));
return steps;
}, As of now the biggest remaining step is probably to determine which adders need to display next steps. As of now I think this would mainly be beneficial because to the |
I just ran it locally to see. I filed a few issues from things I noticed, but the only thing I saw requiring a next step would be something like:
|
0b162f4
to
2414990
Compare
I have shortened the message a little bit, to avoid that it breaks into multiple lines and completely irritates the prompts. Basically, this PR is done now from my end. |
Closes #390
Initial implementation to gather feedback.
This is basically implemented, and you can try it out with the preview release that will be published.
If applying multiple adders (
pnpm dlx svelte-add
) it will always print the display name of the adder and the link to the documentation. If running for one adder alone (pnpm dlx @svelte-add/bootstrap
) it will skip the name and only print the docs link. Additionally, each adder can provide its custom text that will be displayed below the docs link (currently only implemented for the bootstrap adder).Here are a few questions for discussion:
picocolors
or should it be a dependency of the adders that actually need it.