Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

difference between package.json and package lock.json

=>Package.JSON
*->this file is mandatory for every project
*->It contains basicinformation about the project
*->Application name/version/scripts (ng scripts)

=> Package-lock JSON

*->This files automatically generated for those operations where npm modifies either the
rnode_module tree or package-json.

-*>It is generated after an npm install

*->It allows future devs & automated systems to download the same dependencies as
the project.

it also allows you to go back to the past version of the dependencies without actual
‘committing the node_modules folder.

It records the same version of the installed packages which allows to reinstall them.
Futuee installs wll be capable of building identical description tree.

packages locked (already installed in project) -> folder in node_module

install pacakges + their dependencies & create reference in packageson
 
PREVIOUS NEXT
Tagged: #difference #package
ADD COMMENT
Topic
Name
7+9 =