package
Get package publish info: package.json and file list.
npm install pkgdGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 9 packages.
564.1 kB
Includes dependencies.
3 direct · 1 outdated
Get package publish info: package.json and file list.
There are some packages in npm already that read package files. However, some of them are broken and the
others are too slow. Moreover, this package reads package.json as well and provides nice Promise-based
interface.
npm install pkgdconst pkgd = require('pkgd');
pkgd('./projects/pkgd').then(info => {
console.log(info.cfg.name); // > "pkgd"
console.log(info.cfg.author); // > "Ivan Nikulin (ifaaan@gmail.com)"
console.log(info.files); // > [ "package.json", "README.md", "LICENSE", "index.js" ]
});