Skip to content

Commit

Permalink
remove CLI "API" docs
Browse files Browse the repository at this point in the history
Including removing the test for the api section.
  • Loading branch information
othiym23 committed Sep 18, 2015
1 parent c3bd27d commit c69bab9
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 21 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ The place where all things npm are documented.

All the markdown files can be found in the [content](content) directory. Some of these files live here in this repository, others live in other repositories and are imported during the build process. These imported files are [ignored by git](.gitignore) to prevent people from accidentally editing the wrong files.

- [api](https://github.com/npm/npm/tree/master/doc/api) is copied from [npm](https://github.com/npm/npm/tree/master/doc/api).
- [cli](https://github.com/npm/npm/tree/master/doc/cli) is copied from npm.
- [cli](https://github.com/npm/npm/tree/master/doc/cli) is copied from [npm](https://github.com/npm/npm/tree/master/doc/api).
- [enterprise](content/enterprise) lives in this repo.
- [files](https://github.com/npm/npm/tree/master/doc/files) is copied from npm.
- [misc](https://github.com/npm/npm/tree/master/doc/misc) is copied from npm.
Expand Down
1 change: 0 additions & 1 deletion bin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ rm -rf content/policies

# The -p flag preserves file timestamps

cp -pr node_modules/npm/doc/api content/
cp -pr node_modules/npm/doc/cli content/
cp -pr node_modules/npm/doc/files content/
cp -pr node_modules/npm/doc/misc content/
Expand Down
6 changes: 2 additions & 4 deletions bin/tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ emitter.on('file', function (filepath, stat) {
filename: filepath.replace(/.*\/content\//, ''),
modified: null,
modifiedPretty: null,
edit_url: 'https://github.com/npm/npm/edit/master/doc/api/npm-bugs.md',
edit_url: 'https://github.com/npm/npm/edit/master/doc/cli/npm-bugs.md',
content: fs.readFileSync(filepath, 'utf-8')
}

Expand Down Expand Up @@ -73,7 +73,7 @@ emitter.on('file', function (filepath, stat) {
}

// In what repository does this doc live?
if (['api', 'cli', 'files', 'misc'].indexOf(page.section) > -1) {
if (['cli', 'files', 'misc'].indexOf(page.section) > -1) {
page.edit_url = 'https://github.com/npm/npm/edit/master/doc/' + page.filename
} else if (page.section === 'policies') {
page.edit_url = 'https://github.com/npm/policies/edit/master/' + path.basename(page.filename)
Expand All @@ -91,7 +91,6 @@ emitter.on('file', function (filepath, stat) {
}

content.pages.push(page)

})

emitter.on('end', function () {
Expand All @@ -101,5 +100,4 @@ emitter.on('end', function () {

fs.writeFileSync(contentFile, JSON.stringify(content, null, 2))
console.log('Wrote %s', path.relative(process.cwd(), contentFile))

})
3 changes: 0 additions & 3 deletions sections.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
}, {
"id": "files",
"title": "Configuring npm"
}, {
"id": "api",
"title": "Using npm programmatically"
}, {
"id": "policies",
"title": "npm policy documents"
Expand Down
11 changes: 0 additions & 11 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,6 @@ describe('content', function () {
})
})

it('points pages in `api` section to the npm repo', function () {
var apiPages = content.pages.filter(function (page) {
return page.section === 'api'
})
assert(apiPages.length)

apiPages.forEach(function (page) {
assert.equal(page.edit_url, 'https://github.com/npm/npm/edit/master/doc/' + page.filename)
})
})

})

})

0 comments on commit c69bab9

Please sign in to comment.