Table of Contents
Node Modules
Usually Front-end dependencies are managed by npm (more about it in the official documentation). By default, npm installs all dependencies into the node_modules directory.
Every projects lists all its dependencies, required packages and relevant scripts in its respective package.json file.
- Projects and libraries code should never have
node_modulesfolder committed. - Any Project code should commit the
package-lock.jsonfile. This file is automatically generated for any operations wherenpmmodifies either thenode_modulestree, or thepackage.json. It describes the exact tree that was generated, such that subsequent installs are able to generate identical trees, regardless of intermediate dependency updates.