package-json-versionify
Browserify transform to strip package.json of everything but the version
Last updated 9 years ago by nolanlawson .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install package-json-versionify 
SYNC missed versions from official npm registry.

package-json-versionify Build Status

Browserify transform to strip everything from package.json except for the "version" field.

Installation

npm install --save package-json-versionify

Description

Say you want to ship a library, and do something like:

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

Unfortunately, if you do this, then your entire package.json will be included in the output Browserify bundle, which will increase your bundle size. Bummer!

However, if you use this transform, then it will remove everything from package.json except for the "version" field. So when you require('./package.json'), you get something much more compact, e.g.:

{"version":"1.0.0"}

Current Tags

  • 1.0.4                                ...           latest (9 years ago)

5 Versions

  • 1.0.4                                ...           9 years ago
  • 1.0.3                                ...           9 years ago
  • 1.0.2                                ...           10 years ago
  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 4
Last Day 0
Last Week 4
Last Month 1
Dependencies (1)
Dev Dependencies (5)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |