Skip to content

Commit e7ad99b

Browse files
committed
Document public API
1 parent 2d1d3c1 commit e7ad99b

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,21 @@ module.exports = {
5656
}
5757
}
5858
```
59+
60+
### Public API
61+
62+
The `VERSION` and `COMMITHASH` are also exposed through a public API.
63+
64+
Example:
65+
66+
```javascript
67+
var gitRevisionPlugin = new GitRevisionPlugin()
68+
module.exports = {
69+
plugins: [
70+
new DefinePlugin({
71+
'VERSION': JSON.stringify(gitRevisionPlugin.version()),
72+
'COMMITHASH': JSON.stringify(gitRevisionPlugin.commithash()),
73+
})
74+
]
75+
}
76+
```

0 commit comments

Comments
 (0)