browserify-versionify
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -11,3 +11,3 @@ var findRoot = require('find-root'), | ||
version = options.version || | ||
require(path.join(findRoot(process.cwd()), 'package.json')).version, | ||
require(path.join(findRoot(file), 'package.json')).version, | ||
re = new RegExp(placeholder, 'g'); | ||
@@ -14,0 +14,0 @@ |
{ | ||
"name": "browserify-versionify", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Browserify transform to replace placeholder with package version", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -5,4 +5,14 @@ # browserify-versionify | ||
By default, it replaces `__VERSION__` with the version from `package.json` in your source code. | ||
By default, it replaces `__VERSION__` with the version from `package.json` in your source code. E.g. before: | ||
```js | ||
var version = '__VERSION__'; | ||
``` | ||
after: | ||
```js | ||
var version = '1.0.0'; | ||
``` | ||
## Usage | ||
@@ -25,1 +35,13 @@ | ||
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`: | ||
```json | ||
{ | ||
"browserify": { | ||
"transform": [ | ||
"browserify-versionify" | ||
] | ||
} | ||
} | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
16093
11
46