Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate bittorrent-swarm, inline into webtorrent #704

Merged
merged 9 commits into from Mar 29, 2016

remove prettier-bytes dependency

  • Loading branch information
feross committed Mar 29, 2016
commit b3a71830393d62038778255a4eec2da306c69dce
@@ -3,7 +3,6 @@ module.exports = Server
var debug = require('debug')('webtorrent:server')
var http = require('http')
var mime = require('mime')
var prettierBytes = require('prettier-bytes')
var pump = require('pump')
var rangeParser = require('range-parser')
var url = require('url')
@@ -70,7 +69,7 @@ function Server (torrent, opts) {
res.setHeader('Content-Type', 'text/html')
var listHtml = torrent.files.map(function (file, i) {
return '<li><a download="' + file.name + '" href="/' + i + '">' + file.path + '</a> ' +
'(' + prettierBytes(file.length) + ')</li>'
'(' + file.length + ' bytes)</li>'
}).join('<br>')

var html = '<h1>' + torrent.name + '</h1><ol>' + listHtml + '</ol>'
@@ -47,7 +47,6 @@
"package-json-versionify": "^1.0.1",
"parse-torrent": "^5.1.0",
"path-exists": "^2.1.0",
"prettier-bytes": "^1.0.3",
"pump": "^1.0.0",
"random-iterate": "^1.0.1",
"range-parser": "^1.0.2",
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.