mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
19 lines
594 B
TypeScript
19 lines
594 B
TypeScript
import GitRevisionPlugin = require('git-revision-webpack-plugin');
|
|
|
|
const plugin: GitRevisionPlugin = new GitRevisionPlugin();
|
|
|
|
const emptyOptions: GitRevisionPlugin = new GitRevisionPlugin({});
|
|
|
|
const allOptions: GitRevisionPlugin = new GitRevisionPlugin({
|
|
lightweightTags: false,
|
|
branch: false,
|
|
commithashCommand: 'rev-parse HEAD',
|
|
versionCommand: 'describe --always',
|
|
branchCommand: 'rev-parse --abbrev-ref HEAD',
|
|
gitWorkTree: '.',
|
|
});
|
|
|
|
const version: string = plugin.version();
|
|
const commithash: string = plugin.commithash();
|
|
const branch: string = plugin.branch();
|