Fixes official package detection in babelpkglist.
This commit is contained in:
parent
4db50dcd84
commit
1dd9fbf70a
1 changed files with 3 additions and 2 deletions
|
|
@ -41,6 +41,7 @@ proc processContent(content: string) =
|
||||||
dot = if desc.high > 0 and desc[desc.high] in endings: "" else: "."
|
dot = if desc.high > 0 and desc[desc.high] in endings: "" else: "."
|
||||||
listItem = li(a(href=pkgWeb, pkg["name"].str), " ", desc & dot)
|
listItem = li(a(href=pkgWeb, pkg["name"].str), " ", desc & dot)
|
||||||
if pkg["url"].str.startsWith("git://github.com/nimrod-code") or
|
if pkg["url"].str.startsWith("git://github.com/nimrod-code") or
|
||||||
|
pkg["url"].str.startsWith("git://github.com/nim-lang") or
|
||||||
"official" in pkg["tags"].elems:
|
"official" in pkg["tags"].elems:
|
||||||
officialCount.inc
|
officialCount.inc
|
||||||
officialList.add listItem & "\n"
|
officialList.add listItem & "\n"
|
||||||
|
|
@ -52,14 +53,14 @@ proc processContent(content: string) =
|
||||||
|
|
||||||
officialPkgListDiv.innerHTML =
|
officialPkgListDiv.innerHTML =
|
||||||
p("There are currently " & $officialCount &
|
p("There are currently " & $officialCount &
|
||||||
" official packages in the Babel package repository.") &
|
" official packages in the Nimble package repository.") &
|
||||||
ul(officialList)
|
ul(officialList)
|
||||||
|
|
||||||
var unofficialPkgListDiv = document.getElementById("unofficialPkgList")
|
var unofficialPkgListDiv = document.getElementById("unofficialPkgList")
|
||||||
|
|
||||||
unofficialPkgListDiv.innerHTML =
|
unofficialPkgListDiv.innerHTML =
|
||||||
p("There are currently " & $unofficialCount &
|
p("There are currently " & $unofficialCount &
|
||||||
" unofficial packages in the Babel package repository.") &
|
" unofficial packages in the Nimble package repository.") &
|
||||||
ul(unofficialList)
|
ul(unofficialList)
|
||||||
|
|
||||||
proc gotPackageList(apiReply: TData) {.exportc.} =
|
proc gotPackageList(apiReply: TData) {.exportc.} =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue