Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.js3
-rw-r--r--package.json1
2 files changed, 3 insertions, 1 deletions
diff --git a/index.js b/index.js
index 0a15642..75d05cc 100644
--- a/index.js
+++ b/index.js
@@ -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",