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

List requirement to use main in package.json #8560

Closed
wants to merge 1 commit into from
Closed
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
11 changes: 11 additions & 0 deletions docusaurus/docs/custom-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,14 @@ Below is an example `template.json` file:
Any values you add for `"dependencies"` and `"scripts"` will be merged with the Create React App defaults. Values for any other keys will be used as-is, replacing any matching Create React App defaults.

For convenience, we always replace `npm run` with `yarn` in your custom `"scripts"`, as well as in your `README` when projects are initialized with yarn.

### `package.json`

There are not many requirements specific to custom templates for your `package.json`, other than that the `main` key refers to your `template.json` file:

```json
{
"name": "cra-template-[template-name]",
"main": "template.json"
}
```