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

Add command to navigate to and run svelte-kit-demo #881

Closed
wants to merge 3 commits into from
Closed

Add command to navigate to and run svelte-kit-demo #881

wants to merge 3 commits into from

Conversation

ajcwebdev
Copy link

@ajcwebdev ajcwebdev commented Apr 5, 2021

Right now the README verbally explains how to navigate to an example project and run a development server, but it does not provide an example or command for doing so.

You should now be able to run the examples by navigating to one of the directories and doing pnpm dev.

Newer developers who have not worked with monorepos before may not be as familiar with navigating to different directories of their project to run specific commands.

Assuming the reader knows how to cd into a directory is a very, very small assumption to make. Nonetheless, the faster and easier you can get someone to hello world the better, which is why I added two commands to navigate and start the server that can be easily copy pasted.

You should now be able to run the examples by navigating to one of the directories and doing pnpm dev. For example, to run svelte-kit-demo enter the following command:

cd examples/svelte-kit-demo
pnpm dev

If this change is accepted it opens a large question of which of the three examples to pick for providing a happy path. I don't believe I'm the best person to make that decision and would welcome any input from the core team.

Thanks for all the work everyone has done on sveltekit, it's an awesome project!

@babichjacob
Copy link
Member

This won't work on Windows. Not even in PowerShell:

PS C:\Users\Jacob\Repositories\kit> cd examples/svelte-kit-demo && pnpm dev
At line:1 char:29
+ cd examples/svelte-kit-demo && pnpm dev
+                             ~~
The token '&&' is not a valid statement separator in this version.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : InvalidEndOfLine

@ajcwebdev
Copy link
Author

Heh, well look at that, shows my Mac bias 😅.

What would be the equivalent Windows command, and is there a command that would work in both?

@babichjacob
Copy link
Member

I do not personally know.

@ajcwebdev
Copy link
Author

Okay, how about just splitting it into two lines? The && operator is really just for convenience.

cd examples/svelte-kit-demo
pnpm dev

@benmccann benmccann added the documentation Improvements or additions to documentation label Apr 5, 2021
@benmccann
Copy link
Member

benmccann commented Apr 12, 2021

Do we really think that users don't know what "navigating to one of the directories" means and we need to explicitly spell that out by showing the cd command? We generally assume some working knowledge of the basics. I tend to think this just adds verbosity

If we did want to add something here we should keep an eye on #934 which as it stands right now is removing svelte-kit-demo so we may wish to demonstrate the hn.svelte.dev example in that case

@Conduitry
Copy link
Member

cd examples/svelte-kit-demo will also fail on Windows because it expects a backslash as the path separator.

I tend to agree with @benmccann though that we probably shouldn't go out of our way to teach people about shell basics. If they really don't already know what it means to navigate to one of the directories, they will likely run into all sorts of other issues that we definitely don't want to get into explaining in this readme.

@benmccann benmccann closed this Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants