| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 57921eb commit 50cfea0
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -35,6 +35,7 @@ EXEEXT := $(shell $(PYTHON) -c \ | |||
| 35 | 35 | NODE_EXE = node$(EXEEXT) | |
| 36 | 36 | NODE ?= ./$(NODE_EXE) | |
| 37 | 37 | NODE_G_EXE = node_g$(EXEEXT) | |
| 38 | + NPM ?= ./deps/npm/bin/npm-cli.js | ||
| 38 | 39 | ||
| 39 | 40 | # Flags for packaging. | |
| 40 | 41 | BUILD_DOWNLOAD_FLAGS ?= --download=all | |
@@ -286,11 +287,25 @@ out/doc/%: doc/% | |||
| 286 | 287 | # check if ./node is actually set, else use user pre-installed binary | |
| 287 | 288 | gen-json = tools/doc/generate.js --format=json $< > $@ | |
| 288 | 289 | out/doc/api/%.json: doc/api/%.md | |
| 290 | + [ -e tools/doc/node_modules/js-yaml/package.json ] || \ | ||
| 291 | + [ -e tools/eslint/node_modules/js-yaml/package.json ] || \ | ||
| 292 | + if [ -x $(NODE) ]; then \ | ||
| 293 | + cd tools/doc && ../../$(NODE) ../../$(NPM) install; \ | ||
| 294 | + else \ | ||
| 295 | + cd tools/doc && node ../../$(NPM) install; \ | ||
| 296 | + fi | ||
| 289 | 297 | [ -x $(NODE) ] && $(NODE) $(gen-json) || node $(gen-json) | |
| 290 | 298 | ||
| 291 | 299 | # check if ./node is actually set, else use user pre-installed binary | |
| 292 | 300 | gen-html = tools/doc/generate.js --node-version=$(FULLVERSION) --format=html --template=doc/template.html $< > $@ | |
| 293 | 301 | out/doc/api/%.html: doc/api/%.md | |
| 302 | + [ -e tools/doc/node_modules/js-yaml/package.json ] || \ | ||
| 303 | + [ -e tools/eslint/node_modules/js-yaml/package.json ] || \ | ||
| 304 | + if [ -x $(NODE) ]; then \ | ||
| 305 | + cd tools/doc && ../../$(NODE) ../../$(NPM) install; \ | ||
| 306 | + else \ | ||
| 307 | + cd tools/doc && node ../../$(NPM) install; \ | ||
| 308 | + fi | ||
| 294 | 309 | [ -x $(NODE) ] && $(NODE) $(gen-html) || node $(gen-html) | |
| 295 | 310 | ||
| 296 | 311 | docopen: out/doc/api/all.html | |
| Back | FazBrowse Home | New Git URL |
0 commit comments