pkg.json
is a wild-west “package” format for defining packages without a package system.
It’s a (very) limited subset of NPM’s package.json
that allows any project to declare dependencies on arbitrary URLs.
The initial use-case is for Vim and Emacs plugins (which can be downloaded from anywhere), but the format is designed to be generic.
{
"name" : "lspconfig", // OPTIONAL cosmetic name, not used for resolution nor filesystem locations.
"description" : "Quickstart configurations for the Nvim-lsp client", // OPTIONAL
"engines": {
"nvim": "^0.10.0",
"vim": "^9.1.0"
},
"repository": { // REQUIRED
"type": "git", // reserved for future use
"url": "https://github.com/neovim/nvim-lspconfig"
},
"dependencies" : { // OPTIONAL
"https://github.com/neovim/neovim" : "0.6.1",
"https://github.com/lewis6991/gitsigns.nvim" : "0.3"
},
}
pkg.json
is just a way to declare dependencies on URLs and versionspackage.json
pkg.json
file.engine
.The package specification specifies the structure of a package and the pkg.json
format.
git
(packages can live at any git URL)git
and a JSON parser.package.json
. Avoid unnecessary entropy.pkg.json
not have side-effects, only input and output.