npm (Node Package Manager)
npm versioning (package.json version)
Reference > https://stackoverflow.com/a/63112599/1323562
Examples:
"version": "1.8.8"
"version": "2.0.0-alpha.0"
"version": "2.0.0-beta.0"
Comments in pakage.json
The "//" key will never be used by npm for any purpose, and is reserved for comments.
If you want to use a multiple line comment, you can use either an array, or multiple "//" keys.
When using your usual tools (npm, yarn, etc.), multiple "//" keys will be removed.
One must be aware that "//" can only be used at the root of the package.json object.
{
"//": [
"first line",
"second line"
]
}
{
"//": "this is the first line of a comment",
"//": "this is the second line of the comment"
}
Subcommands reference
install
--save flag adds it to the package.json as a dependency.
--save-dev flag adds it to package.json as a development dependency.
a) Install dependencies from package.json
npm install
b) Installs a package, eg 'uuid'.
npm install --save uuid
b) Installs a development package, eg 'caniuse-lite'.
npm install --save-dev caniuse-lite