Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 139 lines (105 sloc) 3.762 kB
64b4d65 explicitly set bash as the shell since the makefile uses bash-isms
gflarity authored
1 SHELL = bash
2
cc34185 @isaacs doc/index.md depends on readme
isaacs authored
3 markdowns = $(shell find doc -name '*.md' | grep -v 'index') README.md
8fdd60d @isaacs Build an index of all html documentation files
isaacs authored
4
308dd42 @isaacs Merge branch 'api-doc' into api-doc2
isaacs authored
5 cli_mandocs = $(shell find doc/cli -name '*.md' \
6 |sed 's|.md|.1|g' \
7 |sed 's|doc/cli/|man/man1/|g' ) \
8 man/man1/README.1 \
9 man/man1/index.1
10
11 api_mandocs = $(shell find doc/api -name '*.md' \
12 |sed 's|.md|.3|g' \
13 |sed 's|doc/api/|man/man3/|g' )
14
15 cli_htmldocs = $(shell find doc/cli -name '*.md' \
16 |grep -v 'index.md' \
17 |sed 's|.md|.html|g' \
18 |sed 's|doc/cli/|html/doc/|g' ) \
19 html/doc/README.html \
20 html/doc/index.html
21
22 api_htmldocs = $(shell find doc/api -name '*.md' \
23 |sed 's|.md|.html|g' \
24 |sed 's|doc/api/|html/api/|g' )
25
26 mandocs = $(api_mandocs) $(cli_mandocs)
27
28 htmldocs = $(api_htmldocs) $(cli_htmldocs)
0e151fc @isaacs build submodules in make process
isaacs authored
29
d8799b9 @isaacs update makefile for submodule removal
isaacs authored
30 all: doc
205a056 @isaacs Close #1445 'make' should build docs as well
isaacs authored
31
d8799b9 @isaacs update makefile for submodule removal
isaacs authored
32 latest:
d7d8662 @isaacs Closes GH-609 `make install` installs current, not latest
isaacs authored
33 @echo "Installing latest published npm"
34 @echo "Use 'make install' or 'make link' to install the code"
35 @echo "in this folder that you're looking at right now."
4325dcc @isaacs fix make latest
isaacs authored
36 node cli.js install -g -f npm
743d387 @isaacs Improve install process.
isaacs authored
37
205a056 @isaacs Close #1445 'make' should build docs as well
isaacs authored
38 install: all
364dfc6 @isaacs Clobber in Makefile
isaacs authored
39 node cli.js install -g -f
743d387 @isaacs Improve install process.
isaacs authored
40
d7d8662 @isaacs Closes GH-609 `make install` installs current, not latest
isaacs authored
41 # backwards compat
42 dev: install
43
db9ee01 @isaacs clean when linking
isaacs authored
44 link: uninstall
364dfc6 @isaacs Clobber in Makefile
isaacs authored
45 node cli.js link -f
e0c6abb @isaacs Add 'clean' make target
isaacs authored
46
205a056 @isaacs Close #1445 'make' should build docs as well
isaacs authored
47 clean: doc-clean uninstall
26e4f5c @isaacs make clean removes npmrc
isaacs authored
48 rm npmrc
c7ec9b5 @isaacs No need to clean cache as often, makes search slow
isaacs authored
49 node cli.js cache clean
743d387 @isaacs Improve install process.
isaacs authored
50
d8799b9 @isaacs update makefile for submodule removal
isaacs authored
51 uninstall:
94df8f3 @isaacs Support npm_debug env in install script
isaacs authored
52 node cli.js rm npm -g -f
86c296f @isaacs Add commands to make man files from the docs.
isaacs authored
53
b337ace @isaacs Update 'make doc' to only ronn build if necessary
isaacs authored
54 doc: $(mandocs) $(htmldocs)
c638e80 @isaacs Add a makefile to build the man page.
isaacs authored
55
64ff08f @isaacs Alias doc-clean and doc-publish to docclean and docpublish
isaacs authored
56 docclean: doc-clean
928bb81 @isaacs Update version in doc
isaacs authored
57 doc-clean:
308dd42 @isaacs Merge branch 'api-doc' into api-doc2
isaacs authored
58 rm -rf \
59 node_modules/ronn \
b337ace @isaacs Update 'make doc' to only ronn build if necessary
isaacs authored
60 node_modules/.bin/ronn \
61 .building_ronn \
308dd42 @isaacs Merge branch 'api-doc' into api-doc2
isaacs authored
62 doc/cli/index.md \
63 doc/api/index.md \
64 $(api_mandocs) \
65 $(cli_mandocs) \
66 $(api_htmldocs) \
67 $(cli_htmldocs) \
68 &>/dev/null || true
205a056 @isaacs Close #1445 'make' should build docs as well
isaacs authored
69
f2ccd17 @isaacs Use ronnjs instead of the ronn rubygem to build docs
isaacs authored
70 # use `npm install ronn` for this to work.
308dd42 @isaacs Merge branch 'api-doc' into api-doc2
isaacs authored
71 man/man1/README.1: README.md scripts/doc-build.sh package.json
72 scripts/doc-build.sh $< $@
73
1f67836 @isaacs Makefile: cli docs live in doc/cli/%.md
isaacs authored
74 man/man1/%.1: doc/cli/%.md scripts/doc-build.sh package.json
88c9df2 @isaacs Depending on a folder is dumb
isaacs authored
75 @[ -d man/man1 ] || mkdir -p man/man1
bf46460 @isaacs Abstract doc building to a separate script
isaacs authored
76 scripts/doc-build.sh $< $@
30818ab @isaacs html docs
isaacs authored
77
88c9df2 @isaacs Depending on a folder is dumb
isaacs authored
78 man/man3/%.3: doc/api/%.md scripts/doc-build.sh package.json
79 @[ -d man/man3 ] || mkdir -p man/man3
bf46460 @isaacs Abstract doc building to a separate script
isaacs authored
80 scripts/doc-build.sh $< $@
ec66825 @isaacs Fold the README into the html doc build
isaacs authored
81
7ce63c3 @isaacs docs include version
isaacs authored
82 html/doc/README.html: README.md html/dochead.html html/docfoot.html scripts/doc-build.sh package.json
bf46460 @isaacs Abstract doc building to a separate script
isaacs authored
83 scripts/doc-build.sh $< $@
ec66825 @isaacs Fold the README into the html doc build
isaacs authored
84
308dd42 @isaacs Merge branch 'api-doc' into api-doc2
isaacs authored
85 html/doc/%.html: doc/cli/%.md html/dochead.html html/docfoot.html scripts/doc-build.sh package.json
bf46460 @isaacs Abstract doc building to a separate script
isaacs authored
86 scripts/doc-build.sh $< $@
87
308dd42 @isaacs Merge branch 'api-doc' into api-doc2
isaacs authored
88 html/api/%.html: doc/api/%.md html/dochead.html html/docfoot.html scripts/doc-build.sh package.json
89 scripts/doc-build.sh $< $@
90
91 doc/cli/index.md: $(markdowns) scripts/index-build.js scripts/doc-build.sh package.json
92 node scripts/index-build.js > $@
93
bfc36a9 @isaacs Build ronn by checking the bin, not the package
isaacs authored
94 node_modules/.bin/ronn:
6819f8b @isaacs Use public ronn instead of git fork
isaacs authored
95 node cli.js install
b337ace @isaacs Update 'make doc' to only ronn build if necessary
isaacs authored
96
5021c4d @isaacs folder structure change
isaacs authored
97 doc: man
dbee5c3 @isaacs Change the way npm help works, so that it will work with man programs…
isaacs authored
98
cf3d925 @isaacs Correct `make doc` and `make man`
isaacs authored
99 man: $(cli_docs) $(api_docs)
86c296f @isaacs Add commands to make man files from the docs.
isaacs authored
100
d8799b9 @isaacs update makefile for submodule removal
isaacs authored
101 test:
176f12e @isaacs Move test command into package.json
isaacs authored
102 node cli.js test
90c9ec8 @isaacs Make test (quietly)
isaacs authored
103
ccf2f4e @isaacs A script for building a release
isaacs authored
104 publish: link doc
9fec6da @isaacs Do a git-clean when publishing
isaacs authored
105 @git push origin :v$(shell npm -v) || true
106 @npm unpublish npm@$(shell npm -v) || true
107 git clean -fd
a7552f6 @isaacs don't always try to push to master. just push to origin
isaacs authored
108 git push origin --tags &&\
bf46460 @isaacs Abstract doc building to a separate script
isaacs authored
109 npm publish &&\
335b387 @isaacs Fix 'make publish'
isaacs authored
110 npm tag npm@$(shell npm -v) $(shell npm -v | awk -F. '{print $$1 "." $$2}') &&\
ccf2f4e @isaacs A script for building a release
isaacs authored
111 make doc-publish &&\
112 make zip-publish
bf46460 @isaacs Abstract doc building to a separate script
isaacs authored
113
64ff08f @isaacs Alias doc-clean and doc-publish to docclean and docpublish
isaacs authored
114 docpublish: doc-publish
bf46460 @isaacs Abstract doc building to a separate script
isaacs authored
115 doc-publish: doc
4bf6ef4 @isaacs Upload docs to new npm site as well as old
isaacs authored
116 rsync -vazu --stats --no-implied-dirs --delete \
117 html/doc/ \
82d0636 @isaacs dist: Upload npm tarballs to a new place
isaacs authored
118 node@npmjs.org:/home/node/npm-www/doc
4bf6ef4 @isaacs Upload docs to new npm site as well as old
isaacs authored
119 rsync -vazu --stats --no-implied-dirs --delete \
120 html/api/ \
82d0636 @isaacs dist: Upload npm tarballs to a new place
isaacs authored
121 node@npmjs.org:/home/node/npm-www/api
4bf6ef4 @isaacs Upload docs to new npm site as well as old
isaacs authored
122 rsync -vazu --stats --no-implied-dirs --delete \
f520573 @isaacs make: Fix 'publish' static file uploads
isaacs authored
123 html/static/webfonts/ \
82d0636 @isaacs dist: Upload npm tarballs to a new place
isaacs authored
124 node@npmjs.org:/home/node/npm-www/static/webfonts
4bf6ef4 @isaacs Upload docs to new npm site as well as old
isaacs authored
125 rsync -vazu --stats --no-implied-dirs --delete \
f520573 @isaacs make: Fix 'publish' static file uploads
isaacs authored
126 html/static/style.css \
82d0636 @isaacs dist: Upload npm tarballs to a new place
isaacs authored
127 node@npmjs.org:/home/node/npm-www/static/
2d27e74 @isaacs Add a 'publish' make target
isaacs authored
128
ccf2f4e @isaacs A script for building a release
isaacs authored
129 zip-publish: release
7cc468d @isaacs Put npm's dist tarbals on nodejs.org
isaacs authored
130 scp release/* node@nodejs.org:dist/npm/
ccf2f4e @isaacs A script for building a release
isaacs authored
131
132 release:
133 @bash scripts/release.sh
134
64ff08f @isaacs Alias doc-clean and doc-publish to docclean and docpublish
isaacs authored
135 sandwich:
ca69133 @isaacs Using 'npm version' now. No need for 'make version'
isaacs authored
136 @[ $$(whoami) = "root" ] && (echo "ok"; echo "ham" > sandwich) || echo "make it yourself" && exit 13
64ff08f @isaacs Alias doc-clean and doc-publish to docclean and docpublish
isaacs authored
137
ccf2f4e @isaacs A script for building a release
isaacs authored
138 .PHONY: all latest install dev link doc clean uninstall test man doc-publish doc-clean docclean docpublish release zip-publish
Something went wrong with that request. Please try again.