Search code examples
javascriptangularcommand-line-interfaceecma

Is Package.json file a mandatory for the Angular 2 plus projects?


other than just listing meta data about application, is there any other use on package.json file? or is it a mandatory file for the application dev.?


Solution

  • package.json file stores all the extra dependencies that has been added by you via npm. So it helps keep track of the dependencies and dev-dependencies so that when you share the code, you do not have to share the dependencies folders, but instead can run an npm install which will automatically download the dependencies.

    package.json file is not mandatory for angular projects. It is for npm to store its dependency related data and metadata.

    As you said, it also stores the meta-data and the scripts required to run.