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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions packages/cra-template-minimal/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# cra-template-minimal

This is the official minimal template for [Create React App](https://github.com/facebook/create-react-app).

To use this template, add `--template minimal` when creating a new app.

For example:

```sh
npx create-react-app my-app --template minimal

# or

yarn create react-app my-app --template minimal
```

For more information, please refer to:

- [Getting Started](https://create-react-app.dev/docs/getting-started) – How to create a new app.
- [User Guide](https://create-react-app.dev) – How to develop apps bootstrapped with Create React App.
27 changes: 27 additions & 0 deletions packages/cra-template-minimal/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "cra-template-minimal",
"version": "1.0.0",
"keywords": [
"react",
"create-react-app",
"template"
],
"description": "The minimal template for Create React App.",
"main": "template.json",
"repository": {
"type": "git",
"url": "https://github.com/facebook/create-react-app.git",
"directory": "packages/cra-template-minimal"
},
"license": "MIT",
"engines": {
"node": ">=8"
},
"bugs": {
"url": "https://github.com/facebook/create-react-app/issues"
},
"files": [
"template",
"template.json"
]
}
1 change: 1 addition & 0 deletions packages/cra-template-minimal/template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
23 changes: 23 additions & 0 deletions packages/cra-template-minimal/template/gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
12 changes: 12 additions & 0 deletions packages/cra-template-minimal/template/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>
9 changes: 9 additions & 0 deletions packages/cra-template-minimal/template/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react';
import ReactDOM from 'react-dom';

ReactDOM.render(
<React.StrictMode>
<h1>React App</h1>
</React.StrictMode>,
document.getElementById('root')
);