current-pkg
Load package.json from current work directory.
Last updated 5 years ago by kchan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install current-pkg 
SYNC missed versions from official npm registry.

current-pkg NPM version NPM downloads Build Status

Load package.json from current work directory.

Install

$ npm install --save current-pkg

Usage

const currentPkg = require('current-pkg')

currentPkg()
/*
{
	pkg: {name: 'packageName', version...}
}
*/

currentPkg(path.join(__dirname, '../another-package'))
/*
{
	pkg: {name: 'otherPackageName', version...}
}
*/

// not found
currentPkg()
/*
{
	error: new Error('Cannot find module ...')
}
*/

License

MIT © EGOIST

Current Tags

  • 0.1.0                                ...           latest (5 years ago)

1 Versions

  • 0.1.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)
Dependents (2)

Copyright 2014 - 2016 © taobao.org |