Skip to content

Commit 8abdf30

Browse files
tripuruyadorno
authored andcommitted
Docs: add missing metadata in semver page
PR-URL: #1572 Credit: @tripu Close: #1572 Reviewed-by: @ruyadorno
1 parent b3a0ec1 commit 8abdf30

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

docs/content/using-npm/semver.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
section: using-npm
3+
title: semver
4+
description: The semantic versioner for npm
5+
---
6+
17
semver(7) -- The semantic versioner for npm
28
===========================================
39

test/tap/semver-doc.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ test('semver doc is up to date', function (t) {
55
var moddoc = path.join(__dirname, '../../node_modules/semver/README.md')
66
var mydoc = path.join(__dirname, '../../docs/content/using-npm/semver.md')
77
var fs = require('fs')
8-
var mod = fs.readFileSync(moddoc, 'utf8').replace(/semver\(1\)/, 'semver(7)')
8+
var mod = fs.readFileSync(moddoc, 'utf8')
9+
mod = mod.substr(mod.match(/^## Install$/m).index)
910
var my = fs.readFileSync(mydoc, 'utf8')
11+
my = my.substr(my.match(/^## Install$/m).index)
1012
t.equal(my, mod)
1113
t.end()
1214
})

0 commit comments

Comments
 (0)