Skip to content

Latest commit

 

History

History
39 lines (25 loc) · 1.23 KB

README.md

File metadata and controls

39 lines (25 loc) · 1.23 KB

47. Packages and tooling

Understand package files and local scripts.

Learn

  • package.json
  • npm scripts
  • dependency pinning
  • build tools

How it works

A package manifest documents scripts and dependencies. Use a tool only when it solves a real need, such as running tests or bundling modules. Understand the distinction between project dependencies and development tools. Keep examples runnable without a large framework so language and browser behavior remain visible.

Common mistake

Blindly installing packages increases maintenance and supply-chain surface.

Guided challenge

Create a package.json with a test script and run a small Node example without adding dependencies.

Run the example

Open example.html in a browser and edit example.js. Save, refresh, and use the Console and debugger to inspect values.

Completion check

Run npm start in this folder to execute node-example.mjs using the script in package.json. This example has no external dependencies.

  • Explain the core idea in your own words without reading the code.
  • Change one input and predict the output before running it.
  • Test one boundary or failure case, then record what you changed.