Next.js: Extend create-next-app to allow for external templates

Created on 15 Jan 2020  路  3Comments  路  Source: vercel/next.js

Feature request

Is your feature request related to a problem? Please describe.

No

We'd like to create a template that can be leveraged by create-next-app. It's awesome to be able to use the examples from https://github.com/zeit/next.js/tree/canary/examples, but we'd like to add the rest of our setup in without resorting to building an additional CLI.

Describe the solution you'd like

I'd like to extend create-next-app to allow for an external template. Ideally, it would support a module from npm, github, etc.

Describe alternatives you've considered

Custom CLI & scripts. We can currently do what we need to by creating a script that calls create-next-app, but it would be better to be able to provide a template folder and avoid having to create an additional cli wrapper.

As another data point, create-react-app just recently released this ability as well.

Additional context

n/a

I'm happy to work on this, I just wanted to discuss it first.

feature request

Most helpful comment

Sounds good! I'll think through that and take a stab at it tomorrow.

All 3 comments

I think it would make sense to allow yarn create next-app --example=https://github.com/example/my-nextjs-starter. Not sure about npm as it's super different. We also already have everything to install from GitHub so it wouldn't increase install size.

Sounds good! I'll think through that and take a stab at it tomorrow.

Can't Wait 馃殌I could help if you need!!

Was this page helpful?
0 / 5 - 0 ratings