A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.npmjs.com/package/nerdbank-gitversioning below:

nerdbank-gitversioning - npm

With this package, and a version.json file to express your version number checked into the root of your git repo:

{
  "version": "1.0-beta"
}

Your NPM packages and other builds can be automatically stamped with a version that precisely describes the git commit that built it.

Stamp your package.json file with the git-based version:

Reset your package.json file with a version placeholder (suitable for checking in):

Or invoke the nbgv tool directly for many options:

A possible script to pack your NPM package:

yarn nbgv-setversion
yarn pack
yarn nbgv-setversion --reset
import * as nbgv from 'nerdbank-gitversioning'

// Retrieve all sorts of version information. Print just one bit.
const versionInfo = await nbgv.getVersion();
console.log(versionInfo.npmPackageVersion);

// Stamp the package.json file in the current directory with the computed version.
await nbgv.setPackageVersion();

// After packing, reset your package.json file to using a placeholder version number.
await nbgv.resetPackageVersionPlaceholder();

See our product documentation for more information.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4