gulp-npm-buildinfo-replace
Inject version info into HTML (package.json, git commit, build info).
Information
Package | gulp-npm-buildinfo-replace |
Description | Inject build information into HTML (package.json, git commit, build info) as comments or meta tags. |
Node Version | >= 0.9 |
Gulp Version | 3.x |
Usage
Install
$ npm install gulp-npm-buildinfo-replace --save-dev
Example
var gulp = ;var buildInfoReplace = ; // Basic usage:gulp;
Options
options.tag
Set a specific tag to insert before it.
Type: `String`
Default: `head`
Example:
// Puts the information into the 'head' DOM element
options.indent
Number of spaces for indentation (for formatting).
Type: `Number`
Default: `4`
Example:
options.version
Places the package.json version.
Type: `Boolean`
Default: `true`
Example:
options.commit
Places the git commit.
Type: `Boolean`
Default: `false`
Example:
options.branch
Places the git branch.
Type: `Boolean`
Default: `false`
Example:
options.utcdate
Places the UTC formatted date.
Type: `Boolean`
Default: `false`
Example:
options.buildms
Places the timestamp as milliseconds.
Type: `Boolean`
Default: `false`
Example:
options.meta
Places the build information as meta elements instead of comments.
Type: `Boolean`
Default: `false`
Example:
options.gitdir
Specifies the git directory to use. Useful if git modules are being used.
Type: `String`
Default: `process.cwd()`
Example:
options.unknownCommit
The string to use when the commit cannot be found.
Type: `String`
Default: `unknown`
Example:
options.unknownBranch
The string to use when the branch cannot be found.
Type: `String`
Default: `unknown`
Example: