Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile16
-rw-r--r--package.json2
2 files changed, 13 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 9ddbe6350..76880dd22 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,12 @@ BRANCH = $(shell git rev-parse --abbrev-ref HEAD)
markdowns = $(shell find docs -name '*.md' | grep -v 'index') README.md
+# these docs have the @VERSION@ tag in them, so they have to be rebuilt
+# whenever the package.json is touched, in case the version changed.
+version_mandocs = $(shell grep -rl '@VERSION@' docs/content \
+ |sed 's|.md|.1|g' \
+ |sed 's|docs/content/commands/|man/man1/|g' )
+
cli_mandocs = $(shell find docs/content/commands -name '*.md' \
|sed 's|.md|.1|g' \
|sed 's|docs/content/commands/|man/man1/|g' ) \
@@ -47,6 +53,8 @@ uninstall:
mandocs: $(mandocs)
+$(version_mandocs): package.json
+
htmldocs:
cd docs && node dockhand.js >&2
@@ -73,11 +81,11 @@ build-doc-tools := node_modules/.bin/marked \
node_modules/.bin/marked-man
# use `npm install marked-man` for this to work.
-man/man1/npm-README.1: README.md scripts/docs-build.js package.json $(build-doc-tools)
+man/man1/npm-README.1: README.md scripts/docs-build.js $(build-doc-tools)
@[ -d man/man1 ] || mkdir -p man/man1
node scripts/docs-build.js $< $@
-man/man1/%.1: docs/content/commands/%.md scripts/docs-build.js package.json $(build-doc-tools)
+man/man1/%.1: docs/content/commands/%.md scripts/docs-build.js $(build-doc-tools)
@[ -d man/man1 ] || mkdir -p man/man1
node scripts/docs-build.js $< $@
@@ -87,11 +95,11 @@ man/man5/npm-json.5: man/man5/package.json.5
man/man5/npm-global.5: man/man5/folders.5
cp $< $@
-man/man5/%.5: docs/content/configuring-npm/%.md scripts/docs-build.js package.json $(build-doc-tools)
+man/man5/%.5: docs/content/configuring-npm/%.md scripts/docs-build.js $(build-doc-tools)
@[ -d man/man5 ] || mkdir -p man/man5
node scripts/docs-build.js $< $@
-man/man7/%.7: docs/content/using-npm/%.md scripts/docs-build.js package.json $(build-doc-tools)
+man/man7/%.7: docs/content/using-npm/%.md scripts/docs-build.js $(build-doc-tools)
@[ -d man/man7 ] || mkdir -p man/man7
node scripts/docs-build.js $< $@
diff --git a/package.json b/package.json
index 8913f4142..b3b761bc0 100644
--- a/package.json
+++ b/package.json
@@ -194,7 +194,7 @@
},
"scripts": {
"dumpconf": "env | grep npm | sort | uniq",
- "prepare": "node bin/npm-cli.js rebuild && node bin/npm-cli.js --no-audit --no-timing prune --prefix=. --no-global && rimraf test/*/*/node_modules && make -j4 mandocs",
+ "prepare": "node bin/npm-cli.js rebuild && make -j4",
"preversion": "bash scripts/update-authors.sh && git add AUTHORS && git commit -m \"update AUTHORS\" || true",
"licenses": "licensee --production --errors-only",
"test": "tap",