liveBook · Manning

Package.json

As explained in LLMs in Production

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

A VS Code extension uses package.json as its manifest: it tells VS Code how to load, identify, and expose the extension. Its activationEvents setting controls when startup occurs, avoiding unnecessary loading until a relevant action happens. section 10.3

A practical extension manifest can define:

  • Startup behavior through activationEvents, such as an inline-suggestion command. section 10.3

Inline suggestion extension

An extension can activate on editor.action.inlineSuggest.trigger and bind that command to Alt+s, giving users deliberate control over requests to an LLM service.

How LLMs in Production covers it

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.
How it connects
Links extension manifests with activation events, commands, keybindings, scripts, and the VS Code API.

Also explained in

Compare how 5 books explain package.json →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of LLMs in Production. The section links point to the parts of the book it draws on.