A package is a reusable software unit installed into a project. Angular applications depend on many packages, whose dependencies are resolved by a package manager and installed in node_modules. section 9.2.2
The project’s package.json records direct packages in dependencies and devDependencies. Runtime dependencies support the application; development dependencies support building, testing, or other development tasks without belonging to the finished application. section 9.2.2
Manage packages with npm commands:
- Install the versions declared in package.json with npm install. section 9.2.2
- Add a specific runtime package with npm install package@version; add a development-only package with --save-dev. section 9.2.2
- Inspect the local package hierarchy with npm list and run project scripts with npm run. section 9.2.2
- Choose version constraints deliberately: an exact version locks one release, while prefixes such as ^ or ~ allow defined update ranges. section 9.2.2
Adding a package and wiring its assets
Adding Bootstrap uses npm install bootstrap@5.2.3. Because Bootstrap does not use Angular schematics, its stylesheet must also be added manually to the build styles configuration, such as with ng config. section 20.1.1
cd SportsStore npm install bootstrap@5.2.3 npm install @fortawesome/fontawesome-free@6.2.1 npm install --save-dev json-server@0.17.3 npm install --save-dev jsonwebtoken@8.5.1
Use this command sequence to install runtime and development packages, including Bootstrap, Font Awesome, json-server, and jsonwebtoken. section 5.1.1







