browserify-versionify
Browserify transform to replace placeholder with package version
Last updated 9 years ago by webpro .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install browserify-versionify 
SYNC missed versions from official npm registry.

browserify-versionify

Browserify transform to replace placeholder with package version.

By default, it replaces __VERSION__ with the version from package.json in your source code. E.g. before:

var version = '__VERSION__';

after:

var version = '1.0.0';

Usage

From command line:

browserify -t browserify-versionify

From Node.js:

browserify().transform('browserify-versionify');

// Configure (default values shown)
browserify().transform('browserify-versionify', {
    placeholder: '__VERSION__',
    version: pkg.version
});

You can also provide a filter property to whitelist files to apply the transform to (e.g. filter: /\.js$/).

You can also add the transform to your package.json:

{
    "browserify": {
        "transform": [
            "browserify-versionify"
        ]
    }
}

Current Tags

  • 1.0.6                                ...           latest (9 years ago)

7 Versions

  • 1.0.6                                ...           9 years ago
  • 1.0.5                                ...           9 years ago
  • 1.0.4                                ...           10 years ago
  • 1.0.3                                ...           10 years ago
  • 1.0.2                                ...           10 years ago
  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
Maintainers (1)
Downloads
Total 3
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (0)
None

© 2010 - cnpmjs.org x YWFE | Home | YWFE