@@ -615,6 +615,13 @@ apidocs_json = $(addprefix out/,$(apidoc_sources:.md=.json))
615
615
616
616
apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/* ) ) )
617
617
618
+ tools/doc/node_modules : tools/doc/package.json
619
+ ifeq ($(node_use_openssl ) ,true)
620
+ cd tools/doc && $(call available-node,$(run-npm-ci))
621
+ else
622
+ @echo "Skipping tools/doc/node_modules (no crypto)"
623
+ endif
624
+
618
625
.PHONY : doc-only
619
626
doc-only : tools/doc/node_modules \
620
627
$(apidoc_dirs ) $(apiassets ) # # Builds the docs with the local or the global Node.js binary.
@@ -932,8 +939,6 @@ $(TARBALL): release-only $(NODE_EXE) doc
932
939
$(RM ) -r $(TARNAME ) /tools/osx-*
933
940
$(RM ) -r $(TARNAME ) /tools/osx-pkg.pmdoc
934
941
$(RM ) -r $(TARNAME ) /tools/pkgsrc
935
- $(RM ) -r $(TARNAME ) /tools/remark-cli
936
- $(RM ) -r $(TARNAME ) /tools/remark-preset-lint-node
937
942
find $(TARNAME ) / -name " .eslint*" -maxdepth 2 | xargs $(RM )
938
943
find $(TARNAME ) / -type l | xargs $(RM ) # annoying on windows
939
944
tar -cf $(TARNAME ) .tar $(TARNAME )
@@ -1061,74 +1066,41 @@ lint-md-rollup:
1061
1066
cd tools/node-lint-md-cli-rollup && npm up
1062
1067
cd tools/node-lint-md-cli-rollup && npm run build-node
1063
1068
1064
-
1065
-
1066
1069
.PHONY : lint-md-clean
1067
1070
lint-md-clean :
1068
- $(RM ) -r tools/remark-cli/node_modules
1069
1071
$(RM ) -r tools/node-lint-md-cli-rollup/remark-preset-lint-node/node_modules
1072
+ $(RM ) -r tools/node-lint-md-cli-rollup/node_modules
1070
1073
$(RM ) tools/.* mdlintstamp
1071
1074
1072
- tools/remark-cli/node_modules : tools/remark-cli/package.json
1073
- @echo " Markdown linter: installing remark-cli into tools/"
1074
- @cd tools/remark-cli && $(call available-node,$(run-npm-ci ) )
1075
-
1076
- tools/node-lint-md-cli-rollup/remark-preset-lint-node/node_modules : \
1077
- tools/node-lint-md-cli-rollup/remark-preset-lint-node/package.json
1078
- @echo " Markdown linter: installing remark-preset-lint-node"
1079
- @cd tools/node-lint-md-cli-rollup/remark-preset-lint-node && $(call available-node,$(run-npm-ci ) )
1080
-
1081
1075
.PHONY : lint-md-build
1082
- lint-md-build : tools/remark-cli/node_modules \
1083
- tools/doc/node_modules \
1084
- tools/node-lint-md-cli-rollup/remark-preset-lint-node/node_modules
1085
-
1086
- tools/doc/node_modules : tools/doc/package.json
1087
- ifeq ($(node_use_openssl ) ,true)
1088
- cd tools/doc && $(call available-node,$(run-npm-ci))
1089
- else
1090
- @echo "Skipping tools/doc/node_modules (no crypto)"
1091
- endif
1092
-
1093
- .PHONY : lint-md
1094
- ifneq ("","$(wildcard tools/remark-cli/node_modules/) ")
1076
+ lint-md-build :
1077
+ $(warning "Deprecated no-op target 'lint-md-build'")
1095
1078
1096
1079
LINT_MD_DOC_FILES = $(shell ls doc/* .md doc/** /* .md)
1097
- run-lint-doc-md = tools/remark-cli/cli .js -q -f $(LINT_MD_DOC_FILES )
1080
+ run-lint-doc-md = tools/lint-md .js -q -f $(LINT_MD_DOC_FILES )
1098
1081
# Lint all changed markdown files under doc/
1099
1082
tools/.docmdlintstamp : $(LINT_MD_DOC_FILES )
1100
- ifeq ($(node_use_openssl ) ,true)
1101
1083
@echo " Running Markdown linter on docs..."
1102
- @$(call available-node,$(run-lint-doc-md))
1103
- @touch $@
1104
- else
1105
- @echo "Skipping Markdown linter on docs (no crypto)"
1106
- endif
1084
+ $(call available-node,$(run-lint-doc-md ) )
1085
+ touch $@
1107
1086
1108
1087
LINT_MD_TARGETS = src lib benchmark test tools/doc tools/icu
1109
1088
LINT_MD_ROOT_DOCS := $(wildcard * .md)
1110
1089
LINT_MD_MISC_FILES := $(shell find $(LINT_MD_TARGETS ) -type f \
1111
1090
-not -path '* node_modules* ' -name '* .md') $(LINT_MD_ROOT_DOCS )
1112
- run-lint-misc-md = tools/remark-cli/cli .js -q -f $(LINT_MD_MISC_FILES )
1091
+ run-lint-misc-md = tools/lint-md .js -q -f $(LINT_MD_MISC_FILES )
1113
1092
# Lint other changed markdown files maintained by us
1114
1093
tools/.miscmdlintstamp : $(LINT_MD_MISC_FILES )
1115
- ifeq ($(node_use_openssl ) ,true)
1116
1094
@echo " Running Markdown linter on misc docs..."
1117
- @$(call available-node,$(run-lint-misc-md))
1118
- @touch $@
1119
- else
1120
- @echo "Skipping Markdown linter on misc docs (no crypto)"
1121
- endif
1095
+ $(call available-node,$(run-lint-misc-md ) )
1096
+ touch $@
1122
1097
1123
1098
tools/.mdlintstamp : tools/.miscmdlintstamp tools/.docmdlintstamp
1124
1099
1100
+ .PHONY : lint-md
1125
1101
# Lints the markdown documents maintained by us in the codebase.
1126
1102
lint-md : | tools/.mdlintstamp
1127
- else
1128
- lint-md :
1129
- @echo " The markdown linter is not installed."
1130
- @echo " To install (requires internet access) run: $ make lint-md-build"
1131
- endif
1103
+
1132
1104
1133
1105
LINT_JS_TARGETS = .eslintrc.js benchmark doc lib test tools
1134
1106
0 commit comments