
How to make a minimal package.json
package.json is needed to tell your computer what dependencys are installed, what devDependencys are installed and other stats. A typical package.jsons first line is { and its last line is } . JSON uses the same indentation as HTML(2 spaces or tabs per indent). The first thing to start a package.json after the {} will be the name. This can be done in one line: "name": "ProjectName" If you are publishing an NPM its name will be the name in package.json this is why it is required . If the package.json only had a name this is how it looks: { "name" : "ProjectNameHere" } Next is the version It is recommended to follow the SemVer versioning. This typicaly follows Major.Minor.Patch Patch is for bug fixes or README.md edits. Minor is for nonbreaking changes. Major is for breaking changes. You can also follow Major.Minor.Patch-label This means you can do "version": "1.0.0-beta" Next is to include the Dependencys(Packages the project is dependent on) Dependencys typicaly are multi-line: { "depe
Continue reading on Dev.to Beginners
Opens in a new tab


