Skip to content

Commit

Permalink
Docs: add missing metadata in semver page
Browse files Browse the repository at this point in the history
PR-URL: #1572
Credit: @tripu
Close: #1572
Reviewed-by: @ruyadorno
  • Loading branch information
tripu authored and ruyadorno committed Aug 17, 2020
1 parent cfccfa5 commit e9faa88
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions docs/content/using-npm/semver.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
section: using-npm
title: semver
description: The semantic versioner for npm
---

semver(7) -- The semantic versioner for npm
===========================================

Expand Down
4 changes: 3 additions & 1 deletion test/tap/semver-doc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ test('semver doc is up to date', function (t) {
var moddoc = path.join(__dirname, '../../node_modules/semver/README.md')
var mydoc = path.join(__dirname, '../../docs/content/using-npm/semver.md')
var fs = require('fs')
var mod = fs.readFileSync(moddoc, 'utf8').replace(/semver\(1\)/, 'semver(7)')
var mod = fs.readFileSync(moddoc, 'utf8')
mod = mod.substr(mod.match(/^## Install$/m).index)
var my = fs.readFileSync(mydoc, 'utf8')
my = my.substr(my.match(/^## Install$/m).index)
t.equal(my, mod)
t.end()
})

0 comments on commit e9faa88

Please sign in to comment.