liveBook · Manning

Package.json

package.json is the standard JSON manifest for an npm or Node.js package, declaring metadata, dependencies, scripts, entry points, and related configuration.

How 7 Manning books explain it

Web Components in Action

package.json is a JSON configuration file that describes a JavaScript package, including its metadata, dependencies, and executable scripts.

How it is used
Organizes JavaScript package metadata, dependencies, development tools, and repeatable npm workflow commands.
How deep it goes
Defines creation, dependency categories, and scripts through examples, but does not detail the full JSON schema.
Examples
Uses npm init, Web Component polyfill installation, an echo test script, and Rollup build scripts for components.
What you can do after
Operate/configure npm to record packages and run development or Rollup build commands through named scripts.

Read how Web Components in Action explains package.json →

Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform

package.json is a JSON-formatted project manifest that declares package metadata, dependencies, and related configuration for a Node.js project.

How it is used
Organizes project metadata, dependencies, and commands for developing, running, and testing Node.js microservices.
How deep it goes
Walks through initialization, dependency installation, and script configuration using working manifests.
Examples
Uses Express and nodemon manifests and a Playwright test script configured for a shared database.
What you can do after
Configure a Node.js project's dependencies and npm scripts for production startup, development reloads, and testing.

Read how Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform explains package.json →

Essential TypeScript 5, Third Edition

package.json is a project configuration file that records package requirements and settings for development tools.

How it is used
Tracks project packages and configures development commands and Node.js module handling.
How deep it goes
Works through creation, install-updated dependency entries, scripts, and module settings; does not describe package-file internals.
Examples
Uses project configurations with TypeScript and tsc-watch, a start script, and an ECMAScript-module import correction.
What you can do after
Operate/configure it to record package requirements, run a compiler watch script, and select a Node.js module format.

Read how Essential TypeScript 5, Third Edition explains package.json →

Secrets of the JavaScript Ninja, Third Edition

package.json is a project manifest file that records package metadata, scripts, and dependencies for JavaScript package tools.

How it is used
Records project dependencies and runnable commands for npm-managed Node.js projects.
How deep it goes
Works through creation, dependency entries, scripts, and the lockfile distinction; leaves full life cycle script rules to npm documentation.
Examples
Uses an Express installation, an ESLint lint script, and minimal manifests for TypeScript tooling.
What you can do after
Operate/configure it by recording dependencies, defining npm scripts, and distinguishing version ranges from locked installations.

Read how Secrets of the JavaScript Ninja, Third Edition explains package.json →

LLMs in Production

package.json is a JSON configuration file that declares metadata, dependencies, scripts, and other package information for a JavaScript project.

How it is used
Configures how a VS Code extension is identified, activated, and exposed to users.
How deep it goes
Defines manifest fields with a worked extension example but stops short of general package-management behavior.
Examples
Uses an LLM coding-copilot manifest with an inline-suggestion trigger, Alt+s keybinding, lint script, and VS Code tests.
What you can do after
Operate/configure a VS Code extension manifest with startup triggers, commands, shortcuts, scripts, and compatibility metadata.

Read how LLMs in Production explains package.json →

Road to Kubernetes

package.json is a project configuration file that records a package's metadata, dependencies, version, and scripts.

How it is used
Tracks Node.js project metadata and third-party dependencies so development and deployment environments can be recreated.
How deep it goes
Explains initialization, metadata, automatic dependency updates, and container copying, but does not detail the complete file specification.
Examples
Uses npm init, npm install express, package-lock.json, node_modules, and a Node.js Dockerfile as concrete artifacts.
What you can do after
Operate/configure Node.js projects by initializing package.json, adding Express.js, restoring dependencies, and preparing container builds.

Read how Road to Kubernetes explains package.json →

Web Component Development with Modern Libraries and Tooling

A JSON project manifest that declares package metadata, dependencies, scripts, and related configuration.

How it is used
Uses package.json to set up npm-based web-component demos and provide a command for starting Vite.
How deep it goes
Shows creation commands, a dev script, and a complete example manifest; does not explain npm manifest rules in detail.
Examples
Shows a Web Awesome manifest with a Vite script and a smaller vanilla-component setup using the same script.
What you can do after
Operate/configure it by creating package.json, adding a Vite dev script, and running the local server with `npm run dev`.

Read how Web Component Development with Modern Libraries and Tooling explains package.json →

Also covered in

What to know first

Related concepts

Questions about package.json

What is package.json?

package.json is the standard JSON manifest for an npm or Node.js package, declaring metadata, dependencies, scripts, entry points, and related configuration.

Which Manning books explain package.json?

Web Components in Action, Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform, Essential TypeScript 5, Third Edition, Secrets of the JavaScript Ninja, Third Edition, LLMs in Production, Road to Kubernetes and Web Component Development with Modern Libraries and Tooling.

What should I know before learning package.json?

Manning books that teach package.json usually introduce JavaScript, package, TypeScript and HTML first.

What are the parts of package.json?

Package.json includes npm script and dependencies.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.