diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-09-20 12:25:08 -1000 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-09-22 10:59:45 -1000 |
commit | 9110e551179f40de7b323d7fd8cfcbd41bac8e8d (patch) | |
tree | c60a277723e32a61b2b8a51b4a9ab0f3ae44ed13 /lib/serve.js | |
parent | 1e2dc6de6b0d0d59f61e42f99899fcfa2b0abcbe (diff) | |
download | patchfoo-9110e551179f40de7b323d7fd8cfcbd41bac8e8d.tar.gz patchfoo-9110e551179f40de7b323d7fd8cfcbd41bac8e8d.zip |
Make npm links more consistent
Diffstat (limited to 'lib/serve.js')
-rw-r--r-- | lib/serve.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/serve.js b/lib/serve.js index c162e42..30689eb 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -1890,10 +1890,10 @@ Serve.prototype.npm = function (url) { var render = self.app.render var base = '/npm/' + (author ? u.escapeId(author) + '/' : '') - var pathWithoutAuthor = '/npm/' + - (name ? name + '/' + - (version ? version + '/' + - (distTag ? distTag + '/' : '') : '') : '') + var pathWithoutAuthor = '/npm' + + (name ? '/' + name + + (version ? '/' + version + + (distTag ? '/' + distTag : '') : '') : '') return pull( ph('section', {}, [ ph('h3', [ph('a', {href: render.toUrl('/npm/')}, 'npm'), ' : ', @@ -1908,7 +1908,7 @@ Serve.prototype.npm = function (url) { ]), ph('table', [ ph('thead', ph('tr', [ - !author ? ph('td', 'publisher') : '', + ph('td', 'publisher'), ph('td', 'package'), ph('td', 'version'), ph('td', 'tag'), @@ -1926,7 +1926,7 @@ Serve.prototype.npm = function (url) { }), paramap(function (link, cb) { self.app.render.npmPackageMention(link, { - withAuthor: !author, + withAuthor: true, author: author, name: name, version: version, |