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

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2011-09-09 00:36:41 +0400
committerisaacs <i@izs.me>2011-09-09 00:36:41 +0400
commit8e08f0d8d6e1f70eaa2358c8ee211e2cfe59192c (patch)
tree9e3dba74c09e9646798723e86307f26acb1c0e7b /scripts
parent4dc1095d7e7358fb50cadbe670cfd4946cba5f88 (diff)
Remove some contrived SYNOPSISes, and just use the heading
Diffstat (limited to 'scripts')
-rw-r--r--scripts/index-build.js13
1 files changed, 2 insertions, 11 deletions
diff --git a/scripts/index-build.js b/scripts/index-build.js
index f78532531..412711a46 100644
--- a/scripts/index-build.js
+++ b/scripts/index-build.js
@@ -15,20 +15,11 @@ fs.readdir(docdir, function (er, docs) {
})).forEach(function (d) {
var doc = path.resolve(docdir, d)
, s = fs.lstatSync(doc)
- , content = fs.readFileSync(doc, "utf8").split("\n\n")
- , syn
- , desc
+ , content = fs.readFileSync(doc, "utf8").split("\n")[0].split("--")[1]
if (s.isSymbolicLink()) return
- content.forEach(function (c, i) {
- c = c.trim()
- //console.log([c, i])
- if (c === "## SYNOPSIS") syn = content[i + 1]
- if (c === "## DESCRIPTION") syn = content[i + 1]
- })
console.log(d.replace(/^.*?([^\/]*)\.md$/, "## npm-$1(1)") + "\n")
- if (desc) console.log(desc + "\n")
- else if (syn) console.log(syn + "\n")
+ console.log(content + "\n")
})
})