Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
doc: remove misleading API documentation
Browse files Browse the repository at this point in the history
The API is awkward, brittle, and frequently counterintuitive. Having it
documented sets an unrealistic expectation of it being a supported /
encouraged thing for developers outside the team to use. Until we have
an API we should stand behind, having it be undocumented is actually a
net win because people won't be misled into thinking they're gonna have
a good time by using it.
  • Loading branch information
othiym23 committed Sep 8, 2015
1 parent b064c40 commit 2fb60bf
Show file tree
Hide file tree
Showing 42 changed files with 4 additions and 1,110 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ npm-debug.log
/test/packages/test-package/random-data.txt
/test/root
/node_modules/.bin
/html/api/
/html/doc/
/man/
/doc/*/npm-index.md
Expand Down
24 changes: 4 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ cli_mandocs = $(shell find doc/cli -name '*.md' \
|sed 's|doc/cli/|man/man1/|g' ) \
man/man1/npm-README.1

api_mandocs = $(shell find doc/api -name '*.md' \
|sed 's|.md|.3|g' \
|sed 's|doc/api/|man/man3/|g' )

files_mandocs = $(shell find doc/files -name '*.md' \
|sed 's|.md|.5|g' \
|sed 's|doc/files/|man/man5/|g' ) \
Expand All @@ -36,10 +32,6 @@ cli_htmldocs = $(shell find doc/cli -name '*.md' \
|sed 's|doc/cli/|html/doc/cli/|g' ) \
html/doc/README.html

api_htmldocs = $(shell find doc/api -name '*.md' \
|sed 's|.md|.html|g' \
|sed 's|doc/api/|html/doc/api/|g' )

files_htmldocs = $(shell find doc/files -name '*.md' \
|sed 's|.md|.html|g' \
|sed 's|doc/files/|html/doc/files/|g' ) \
Expand All @@ -51,9 +43,9 @@ misc_htmldocs = $(shell find doc/misc -name '*.md' \
|sed 's|doc/misc/|html/doc/misc/|g' ) \
html/doc/index.html

mandocs = $(api_mandocs) $(cli_mandocs) $(files_mandocs) $(misc_mandocs)
mandocs = $(cli_mandocs) $(files_mandocs) $(misc_mandocs)

htmldocs = $(api_htmldocs) $(cli_htmldocs) $(files_htmldocs) $(misc_htmldocs)
htmldocs = $(cli_htmldocs) $(files_htmldocs) $(misc_htmldocs)

all: doc

Expand Down Expand Up @@ -93,7 +85,6 @@ doc-clean:
.building_marked \
.building_marked-man \
html/doc \
html/api \
man

# use `npm install marked-man` for this to work.
Expand All @@ -105,10 +96,6 @@ man/man1/%.1: doc/cli/%.md scripts/doc-build.sh package.json
@[ -d man/man1 ] || mkdir -p man/man1
scripts/doc-build.sh $< $@

man/man3/%.3: doc/api/%.md scripts/doc-build.sh package.json
@[ -d man/man3 ] || mkdir -p man/man3
scripts/doc-build.sh $< $@

man/man5/npm-json.5: man/man5/package.json.5
cp $< $@

Expand Down Expand Up @@ -138,12 +125,9 @@ html/doc/cli/%.html: doc/cli/%.md $(html_docdeps)
@[ -d html/doc/cli ] || mkdir -p html/doc/cli
scripts/doc-build.sh $< $@

html/doc/api/%.html: doc/api/%.md $(html_docdeps)
@[ -d html/doc/api ] || mkdir -p html/doc/api
scripts/doc-build.sh $< $@

html/doc/files/npm-json.html: html/doc/files/package.json.html
cp $< $@

html/doc/files/npm-global.html: html/doc/files/npm-folders.html
cp $< $@

Expand All @@ -168,7 +152,7 @@ node_modules/.bin/marked-man:

doc: man

man: $(cli_docs) $(api_docs)
man: $(cli_docs)

test: doc
node cli.js test
Expand Down
13 changes: 0 additions & 13 deletions doc/api/npm-bin.md

This file was deleted.

19 changes: 0 additions & 19 deletions doc/api/npm-bugs.md

This file was deleted.

30 changes: 0 additions & 30 deletions doc/api/npm-cache.md

This file was deleted.

22 changes: 0 additions & 22 deletions doc/api/npm-commands.md

This file was deleted.

45 changes: 0 additions & 45 deletions doc/api/npm-config.md

This file was deleted.

34 changes: 0 additions & 34 deletions doc/api/npm-deprecate.md

This file was deleted.

19 changes: 0 additions & 19 deletions doc/api/npm-docs.md

This file was deleted.

24 changes: 0 additions & 24 deletions doc/api/npm-edit.md

This file was deleted.

18 changes: 0 additions & 18 deletions doc/api/npm-explore.md

This file was deleted.

30 changes: 0 additions & 30 deletions doc/api/npm-help-search.md

This file was deleted.

29 changes: 0 additions & 29 deletions doc/api/npm-init.md

This file was deleted.

19 changes: 0 additions & 19 deletions doc/api/npm-install.md

This file was deleted.

Loading

0 comments on commit 2fb60bf

Please sign in to comment.