diff options
-rw-r--r-- | index.js | 3 | ||||
-rw-r--r-- | package.json | 1 |
2 files changed, 3 insertions, 1 deletions
@@ -31,7 +31,8 @@ inherits(WebTorrent, EventEmitter) * '0.16.1' -> '0016' * '1.2.5' -> '0102' */ -var VERSION = '__VERSION__'.match(/([0-9]+)/g).slice(0, 2).map(zeroFill(2)).join('') +var VERSION = (require('./package.json').version || '__VERSION__') + .match(/([0-9]+)/g).slice(0, 2).map(zeroFill(2)).join('') /** * WebTorrent Client diff --git a/package.json b/package.json index 85b0609..54a9c27 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "browser": { "./lib/fs-storage": false, "./server": false, + "./package.json": false, "addr-to-ip-port": false, "bittorrent-dht/client": false, "bittorrent-swarm": "webtorrent-swarm", |