Package Exports
- browserify-versionify
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (browserify-versionify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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-versionifyFrom 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"
]
}
}