diff options
author | claudiahdz <cghr1990@gmail.com> | 2019-10-22 17:51:20 +0300 |
---|---|---|
committer | Ruy Adorno <ruyadorno@hotmail.com> | 2019-11-05 19:37:50 +0300 |
commit | ae4c74d04f820a0255a92bdfe77ecf97af134fae (patch) | |
tree | 68570baee106eb71ac4ffce94a59777d5737a013 /test | |
parent | 21fc17af6a27c1457d6608b0583fd6e7c3813dc5 (diff) |
docs: migrate existing docs to gatsby
- chore(docs): remove html from docs build
- feat(docs): migrate new Gatsby site to cli/docs
- chore(docs): fix docs url path
- chore(docs): add new build doc step
- chore(docs): add static linking
- chore(docs): add npm favicon
- chore(docs): update files for tests
- chore(docs): make relative paths absolute
- chore(docs): fix routing on docs dependant tests
- chore(docs): add prepublishOnly docs building step
- chore(docs): add docs/public to .gitignore
- chore(docs): rename dot json markdown files with hyphen names
- chore(docs): clean package.json
- chore(docs): highlight scripts in list
- chore(docs): add strong styles
- chore(docs): fix .json links on markdown
- Added copy to the features page
- Added an install page (copied from existing online docs)
- Added a FeatureLink component to components/links.js
- feat(docs): replace docs sh script with node
- chore(docs): fix docs building process
- chore(docs): docs folder cleanup
PR-URL: https://github.com/npm/cli/pull/274
Credit: @claudiahdz
Close: #274
Reviewed-by: @ruyadorno
Diffstat (limited to 'test')
-rw-r--r-- | test/tap/config-meta.js | 10 | ||||
-rw-r--r-- | test/tap/semver-doc.js | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/test/tap/config-meta.js b/test/tap/config-meta.js index 97918b889..a98d5e6c4 100644 --- a/test/tap/config-meta.js +++ b/test/tap/config-meta.js @@ -11,7 +11,7 @@ var root = path.resolve(__dirname, '..', '..') var lib = path.resolve(root, 'lib') var bin = path.resolve(root, 'bin') var nm = path.resolve(root, 'node_modules') -var doc = path.resolve(root, 'doc/misc/npm-config.md') +var doc = path.resolve(root, 'docs/content/using-npm/config.md') var FILES = [] var CONFS = {} var DOC = {} @@ -85,12 +85,12 @@ test('get lines', function (t) { test('get docs', function (t) { var d = fs.readFileSync(doc, 'utf8').split(/\r|\n/) // walk down until the '## Config Settings' section - for (var i = 0; i < d.length && d[i] !== '## Config Settings'; i++); + for (var i = 0; i < d.length && d[i] !== '### Config Settings'; i++); i++ // now gather up all the ^###\s lines until the next ^##\s - for (; i < d.length && !d[i].match(/^## /); i++) { - if (d[i].match(/^### /)) { - DOC[ d[i].replace(/^### /, '').trim() ] = true + for (; i < d.length && !d[i].match(/^### /); i++) { + if (d[i].match(/^#### /)) { + DOC[ d[i].replace(/^#### /, '').trim() ] = true } } t.pass('read the docs') diff --git a/test/tap/semver-doc.js b/test/tap/semver-doc.js index 31c75fffd..1cc978201 100644 --- a/test/tap/semver-doc.js +++ b/test/tap/semver-doc.js @@ -3,7 +3,7 @@ var test = require('tap').test test('semver doc is up to date', function (t) { var path = require('path') var moddoc = path.join(__dirname, '../../node_modules/semver/README.md') - var mydoc = path.join(__dirname, '../../doc/misc/semver.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 my = fs.readFileSync(mydoc, 'utf8') |