@@ -22,7 +22,7 @@ misc_mandocs = $(shell find docs/content/using-npm -name '*.md' \
22
22
23
23
mandocs = $(cli_mandocs ) $(files_mandocs ) $(misc_mandocs )
24
24
25
- all : doc
25
+ all : docs
26
26
27
27
latest :
28
28
@echo " Installing latest published npm"
@@ -39,57 +39,61 @@ dev: install
39
39
link : uninstall
40
40
node bin/npm-cli.js link -f
41
41
42
- clean : markedclean marked-manclean doc -clean
42
+ clean : markedclean marked-manclean docs -clean
43
43
rm -rf npmrc
44
44
node bin/npm-cli.js cache clean --force
45
45
46
46
uninstall :
47
47
node bin/npm-cli.js rm npm -g -f
48
48
49
- doc : $(mandocs )
49
+ docs : $(mandocs )
50
+ cd docs && node ../bin/npm-cli.js run build:static echo>&2 && cd ..
51
+ find docs/public -name ' *.html' -exec \
52
+ node scripts/docs-build.js {} \;
50
53
51
54
markedclean :
52
55
rm -rf node_modules/marked node_modules/.bin/marked .building_marked
53
56
54
57
marked-manclean :
55
58
rm -rf node_modules/marked-man node_modules/.bin/marked-man .building_marked-man
56
59
57
- docclean : doc -clean
58
- doc -clean :
60
+ docsclean : docs -clean
61
+ docs -clean :
59
62
rm -rf \
60
63
.building_marked \
61
64
.building_marked-man \
62
- man
65
+ man \
66
+ docs/public
63
67
64
68
# # build-time tools for the documentation
65
69
build-doc-tools := node_modules/.bin/marked \
66
70
node_modules/.bin/marked-man
67
71
68
72
# use `npm install marked-man` for this to work.
69
- man/man1/npm-README.1 : README.md scripts/doc -build.sh package.json $(build-doc-tools )
73
+ man/man1/npm-README.1 : README.md scripts/docs -build.js package.json $(build-doc-tools )
70
74
@[ -d man/man1 ] || mkdir -p man/man1
71
- scripts/doc -build.sh $< $@
75
+ node scripts/docs -build.js $< $@
72
76
73
- man/man1/% .1 : docs/content/cli-commands/% .md scripts/doc -build.sh package.json $(build-doc-tools )
77
+ man/man1/% .1 : docs/content/cli-commands/% .md scripts/docs -build.js package.json $(build-doc-tools )
74
78
@[ -d man/man1 ] || mkdir -p man/man1
75
- scripts/doc -build.sh $< $@
79
+ node scripts/docs -build.js $< $@
76
80
77
81
man/man1/npx.1 : node_modules/libnpx/libnpx.1
78
82
cat $< | sed s/libnpx/npx/ > $@
79
83
80
84
man/man5/npm-json.5 : man/man5/package.json.5
81
85
cp $< $@
82
86
83
- man/man5/npm-global.5 : man/man5/folders .5
87
+ man/man5/npm-global.5 : man/man5/foslders .5
84
88
cp $< $@
85
89
86
- man/man5/% .5 : docs/content/configuring-npm/% .md scripts/doc -build.sh package.json $(build-doc-tools )
90
+ man/man5/% .5 : docs/content/configuring-npm/% .md scripts/docs -build.js package.json $(build-doc-tools )
87
91
@[ -d man/man5 ] || mkdir -p man/man5
88
- scripts/doc -build.sh $< $@
92
+ node scripts/docs -build.js $< $@
89
93
90
- man/man7/% .7 : docs/content/using-npm/% .md scripts/doc -build.sh package.json $(build-doc-tools )
94
+ man/man7/% .7 : docs/content/using-npm/% .md scripts/docs -build.js package.json $(build-doc-tools )
91
95
@[ -d man/man7 ] || mkdir -p man/man7
92
- scripts/doc -build.sh $< $@
96
+ node scripts/docs -build.js $< $@
93
97
94
98
marked : node_modules/.bin/marked
95
99
@@ -101,11 +105,7 @@ marked-man: node_modules/.bin/marked-man
101
105
node_modules/.bin/marked-man :
102
106
node bin/npm-cli.js install marked-man --no-global --no-timing --no-save
103
107
104
- doc : man
105
-
106
- man : $(cli_docs )
107
-
108
- test : doc
108
+ test : docs
109
109
node bin/npm-cli.js test
110
110
111
111
tag :
@@ -117,17 +117,17 @@ ls-ok:
117
117
gitclean :
118
118
git clean -fd
119
119
120
- publish : gitclean ls-ok link doc -clean doc
120
+ publish : gitclean ls-ok link docs -clean docs
121
121
@git push origin :v$(shell node bin/npm-cli.js --no-timing -v) 2>&1 || true
122
122
git push origin $(BRANCH ) && \
123
123
git push origin --tags && \
124
124
node bin/npm-cli.js publish --tag=$(PUBLISHTAG )
125
125
126
- release : gitclean ls-ok markedclean marked-manclean doc -clean doc
126
+ release : gitclean ls-ok markedclean marked-manclean docs -clean doc
127
127
node bin/npm-cli.js prune --production --no-save
128
128
@bash scripts/release.sh
129
129
130
130
sandwich :
131
131
@[ $$ (whoami) = " root" ] && (echo " ok" ; echo " ham" > sandwich) || (echo " make it yourself" && exit 13)
132
132
133
- .PHONY : all latest install dev link doc clean uninstall test man doc -clean docclean release ls-ok realclean
133
+ .PHONY : all latest install dev link doc clean uninstall test man docs -clean docclean release ls-ok realclean
0 commit comments