Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

packageify

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

packageify

inline things like "require('package.version')". Do not include all the package.json in your bundles.

  • 0.2.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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.

License

MIT 2014 - Jose F. Romaniello

Keywords

FAQs

Package last updated on 07 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc