turbo icon indicating copy to clipboard operation
turbo copied to clipboard

Ability to create a repo with create-turbo from an example

Open bring-shrubbery opened this issue 3 years ago • 2 comments

Describe the feature you'd like to request

When running create-turbo at the moment, you always get the same placeholder setup (next.js, docs, tsconfig, config, ui packages). Having a --example flag that you can use to provide an example from the examples folder of this repo would be very nice. Maybe similar to how create-next-app does it?

Describe the solution you'd like

I would like to run this command to create a design system turborepo:

npx create-turbo@latest --example design-system

Describe alternatives you've considered

Alternatively, an "Examples" section could be added to the docs, which could automatically render the README files from examples in this repo. This would be a useful and simpler solution, compared to changing the create-turbo CLI.

bring-shrubbery avatar Feb 02 '22 06:02 bring-shrubbery

perhaps a specific example could be chosen within the cli instead of as a flag? either way this would be helpful.

DefinitelyMaybe avatar Jul 24 '22 23:07 DefinitelyMaybe

@DefinitelyMaybe absolutely, I was just suggesting the same way as next.js has when creating repo from an example.

bring-shrubbery avatar Jul 25 '22 07:07 bring-shrubbery

Took a little bit, but this finally landed! It's available now in canary, and we would love any feedback:

npx create-turbo@canary -e {example}

tknickman avatar Apr 04 '23 23:04 tknickman

@tknickman Nice! I will definitely try this out in a near future.

bring-shrubbery avatar Apr 05 '23 15:04 bring-shrubbery