Package Exports
- r-package-json
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (r-package-json) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
r-package-json

Read package.json files.
Installation
$ npm i --save r-package-json
Example
const readPack = require("r-package-json");
readPack(__dirname + "/..", function (err, pack) {
console.log(err || pack);
// { name: 'w-package-json',
// version: '1.0.0',
// description: 'Write package.json files.',
// main: 'index.js',
// ...
// }
});
Documentation
readPackageJson(dir, callback)
Reads the package.json
content from the provided directory.
Params
- String
dir
: The path to the directory containing thepackage.json
file. - Function
callback
: The callback function.
Return
- Object The
package.json
content (if acallback
function was not provided).
How to contribute
Have an idea? Found a bug? See how to contribute.
Where is this library used?
If you are using this library in one of your projects, add it in this list. ✨
Related
w-package-json
–Write package.json files.