What metadata does the npm file package.json contain?
A file package.json contains:
Basic information about the project (not all of them are mandatory)
- project name
- project description
- project version
- project author
- project license
- project homepage
Scripts are aliased command-line commands that can be executed using their alias.
The property dependencies contains a list of dependencies (packages) the project uses and needs to have installed in order to be able to run.
The property devDependencies contains a list of dependencies (packages) that are used during development (like web server, minifier, uglifier, bundler, ...), but are not needed for the program to run.
Related npm job interview questions