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 minimal template #8649

Closed
wants to merge 3 commits into from
Closed

Add minimal template #8649

wants to merge 3 commits into from

Conversation

nickserv
Copy link
Contributor

Inspired by #6270, this adds a cra-template-minimal package which uses the bare minimum file structure necessary to function with React (based on the default cra-template). Optional files like tests and assets have been removed so more experienced users can have full control over what's included, while making less assumptions about tech stack.

Test Plan

npx create-react-app my-app --template file:packages/cra-template-minimal

  • start displays React App without errors or warnings
  • build succeeds and server displays React App without errors or warnings
  • test shows no tests, and errors in CI as per Jest's defaults

@mrmckeb
Copy link
Contributor

mrmckeb commented Mar 15, 2020

Thanks @nickmccurdy.

We have definitely talked about doing this before, and it was one of the motivating factors behind CRA templates.

I'm interested in @ianschmitz and @iansu's thoughts on this.

@ianschmitz
Copy link
Contributor

Yeah I know @iansu and I talked about this as well. Seems reasonable!

@nickserv
Copy link
Contributor Author

For what it's worth, I'm aware that his cra-template-empty template is similar, though I thought it would be a good idea to recreate one based on cra-template and have it maintained in the same repository.

@ianschmitz
Copy link
Contributor

Yeah we had already claimed cra-template-minimal way back before we launched the template feature. So we should be good to go there.

@ianschmitz ianschmitz added this to the 3.4.1 milestone Mar 16, 2020
@iansu iansu modified the milestones: 3.4.1, 3.4.2 Mar 20, 2020
@ianschmitz ianschmitz modified the milestones: 3.5, 4.0 May 3, 2020
@iansu
Copy link
Contributor

iansu commented May 5, 2020

I'd personally like to avoid adding more templates directly to Create React App. We already have issues with maintaining the JavaScript and TypeScript templates. This is exactly why we added external templates.

@nickserv
Copy link
Contributor Author

nickserv commented May 5, 2020

Personally I’m more interested in having a template named minimal than having it be in this repo. Would you be interested in moving this into a separate package of yours (or maybe renaming the empty template as I feel minimal is more fitting)? Alternatively if you don’t mind giving me the name I’d be happy to publish this myself.

@iansu
Copy link
Contributor

iansu commented May 5, 2020

We actually talked about this a few weeks ago and I was just going to publish the "empty" template under that name for both JavaScript and TypeScript. The "empty" name came out of tweet at some point but I think minimal is a better name.

@nickserv
Copy link
Contributor Author

nickserv commented May 5, 2020

Is there anything I could help out with? Like extracting a repo of this PR, renaming your existing repo, etc

@iansu
Copy link
Contributor

iansu commented May 7, 2020

I've published a set of minimal templates: https://github.com/iansu/cra-minimal-templates

Thanks for your PR but I'm going to close this now.

@iansu iansu closed this May 7, 2020
@lock lock bot locked and limited conversation to collaborators May 20, 2020
@nickserv nickserv deleted the minimal branch June 23, 2022 17:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants