Inline things from your package.json without including all the package.json in the bundle.
JavaScript
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
.travis.yml
LICENSE
README.md
index.js
package.json

README.md

Build Status

Inline things from your package.json without including all the package.json.

You can require package.json with browserify since it is a JSON as follows:

require('./package.json');

this is often an overkill since it will include all the package.json file and most of the time you only need things like the version property:

exports.version = require('./package.json').version;

With this transforms you can use:

exports.version = require('package.version');

and it will transform to:

exports.version = '1.0.20';

Any field works for instance

exports.author = require('package.author');
exports.license = require('package.license');

Usage

npm i packageify --save-dev

Then add the transform as any other transform.

Issue Reporting

If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.

Author

Auth0

License

This project is licensed under the MIT license. See the LICENSE file for more info.