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_modules
folder committed. - Any Project code should commit the
package-lock.json
file. This file is automatically generated for any operations wherenpm
modifies either thenode_modules
tree, 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.