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 better entry point description #1177

Merged
merged 1 commit into from
Nov 15, 2022
Merged
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
4 changes: 2 additions & 2 deletions lang/en/docs/creating-a-package.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ The fields you see in the `package.json` have the following meanings:
a package as much as you want but they must have new versions.
- **description** is an optional but recommended field that gets used by other
Yarn users to search for and understand your project.
- **main** is used to define the entry point of your code used by programs like
Node.js. If unspecified it will default to `index.js`.
- **main** s used to define the entry point of your code used by packagers or development environments as NodeJS. If unspecified it will default to `index.js`.
- **repository** is another optional but recommended field that helps users of
your package find the source code to contribute back.
- **author** is the creator or maintainer of a package. It follows the format
`"Your Name <you@example.com> (https://your-website.com)"`
- **license** is the published legal terms of your package and what is the
allowed usage of the code in your package.

> Today package.json supports the "exports" entry point which is taken over "main" entry point if it is defined.
When you run `yarn init`, all it is doing is creating this file, nothing
happens in the background. You can feel free to edit this file as much as you
want.
Expand Down