---
title: package.json
---

This document serves as a replace for comments in `package.json`, since it includes a lot of configuration often requiring explanation.

## name

[name](https://docs.npmjs.com/files/package.json#name)

This field is used by the to display the name of the project.




## Scripts

[scripts](https://docs.npmjs.com/files/package.json#scripts)

This field allows you to define commands that can be run from the terminal and sometimes [from editors](https://code.visualstudio.com/docs/editor/tasks). For example, in the following script:

```bash
# run project in development
"dev": "nuxt"
```

The name is `dev`, allowing you to run the script using `npm run dev`. When the script is run, it will execute the code: `nuxt` which in this case will launch Nuxt in development mode with hot reloading. All scripts in `package.json` have access to both globally installed binaries and those provided by local dependencies.

## githooks

[gitHooks](https://github.com/yyx990803/yorkie#yorkie)

This field works is provided by [yorkie](https://github.com/yyx990803/yorkie) and works similarly to `scripts`, except the key of each field is the name of a [client-side Git hook](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks#_client_side_hooks) that runs automatically at a specific point in your Git workflow.

This project is currently configured to run checks defined in `lint-staged.config.js` on every file staged for commit, before allowing that commit to proceed. This prevents certain runtime errors, style violations, debugging code, and failing unit tests from accidentally being committed to the codebase.

## dependencies

[dependencies](https://docs.npmjs.com/files/package.json#dependencies)

This field allows you to define dependencies that will be included in your bundled source code. Running `yarn add` will add dependencies to this list.

Since changes to these dependencies directly affect the code you ship, they're all locked to specific versions rather than using version ranges. Somewhere between a weekly and monthly basis, it's recommended to run `yarn outdated` to see what new versions have been released, then review the changelogs for each outdated dependency to determine:

- Whether you want to upgrade.

- Whether upgrading would require code changes (e.g. even a patch release fixing a bug may require you to update code that was previously working around or even relying on that bug).

- Whether upgrading might change your application's roadmap (e.g. a new feature may open possibilities that were previously inconceivable, unfeasible, or not worth the time).

Once you've determined how you'd like to proceed, you can update these versions manually and re-run `yarn` to install the new versions.

## dev Dependencies

[devDependencies](https://docs.npmjs.com/files/package.json#devdependencies)

This field allows you to define dev dependencies, which are _not_ included in your bundled source code, but instead used in development for code compilation/transformation, development servers, tests, and other development tasks. Running `npm install  --dev` will add dependencies to this list.

## engines

[engines](https://docs.npmjs.com/files/package.json#engines)

This field allows you to define specific versions for globally installed runtimes and tooling, such as [Node](https://nodejs.org) and [Yarn](https://yarnpkg.com). Ensuring that everyone on your team meets a minimum version threshold can vastly simplify debugging issues that only some developers experience.

## browserlist

[browserlist](https://flaviocopes.com/package-json/#browserslist)

This field defines the browser ranges this project supports, used to determine which polyfills and helpers must be added by code compilers.
