Skip to content

Commit 23e7046

Browse files
committed
Rearrange files
1 parent 13778a9 commit 23e7046

File tree

6 files changed

+38
-40
lines changed

6 files changed

+38
-40
lines changed

tools/make/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,12 @@ include $(TOOLS_MAKE_LIB_DIR)/init/Makefile
7474
# Please keep sorted in alphabetical order:
7575
include $(TOOLS_MAKE_LIB_DIR)/benchmark/Makefile
7676
include $(TOOLS_MAKE_LIB_DIR)/bib/Makefile
77-
include $(TOOLS_MAKE_LIB_DIR)/bundle/Makefile
7877
include $(TOOLS_MAKE_LIB_DIR)/complexity/Makefile
7978
include $(TOOLS_MAKE_LIB_DIR)/contributors/Makefile
8079
include $(TOOLS_MAKE_LIB_DIR)/coverage-service/Makefile
8180
include $(TOOLS_MAKE_LIB_DIR)/debug/Makefile
8281
include $(TOOLS_MAKE_LIB_DIR)/deps/Makefile
82+
include $(TOOLS_MAKE_LIB_DIR)/dist/Makefile
8383
include $(TOOLS_MAKE_LIB_DIR)/docs/Makefile
8484
include $(TOOLS_MAKE_LIB_DIR)/examples/Makefile
8585
include $(TOOLS_MAKE_LIB_DIR)/install/Makefile
File renamed without changes.
Lines changed: 37 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,19 @@
2222
NPM_VERSION ?=
2323

2424
# Define a Git commit message when incrementing the project version:
25-
NPM_VERSION_MESSAGE ?=
25+
NPM_VERSION_COMMIT_MESSAGE ?= 'Increment version'
2626

27-
# Define command-line options when incrementing the project version:
28-
npm_version_flags ?=
29-
ifdef NPM_VERSION_MESSAGE
30-
npm_version_flags += -m $(NPM_VERSION_MESSAGE)
31-
endif
27+
# Specify the output build directory when generating a gzipped archive:
28+
NPM_TARBALL_BUILD_OUT ?= $(BUILD_DIR)/npm
29+
30+
# Specify the gzipped archive basename:
31+
npm_tarball_basename := "stdlib_v$(shell $(CURRENT_PROJECT_VERSION)).tgz"
32+
33+
# Specify the output gzipped archive basename:
34+
NPM_TARBALL ?= $(npm_tarball_basename)
35+
36+
# Specify the output gzipped archive file path:
37+
npm_tarball := $(NPM_TARBALL_BUILD_OUT)/$(NPM_TARBALL)
3238

3339
# Define the version upgrade prerequisite...
3440
ifeq ($(NPM_VERSION), pre-patch)
@@ -61,51 +67,45 @@ endif
6167
endif
6268
endif
6369

64-
# Specify the output build directory when generating an npm gzipped archive:
65-
NPM_TARBALL_BUILD_OUT := $(BUILD_DIR)/npm
66-
67-
# Specify the gzipped archive basename:
68-
npm_tarball_basename := "stdlib-stdlib-$(shell $(CURRENT_PROJECT_VERSION)).tgz"
6970

70-
# Specify the output npm gzipped archive:
71-
NPM_TARBALL ?= $(NPM_TARBALL_BUILD_OUT)/$(npm_tarball_basename)
71+
# RULES #
7272

73-
74-
# TARGETS #
75-
76-
# Generate an npm tarball.
73+
#/
74+
# Generates a gzipped archive for publishing to npm.
7775
#
78-
# This target generates an npm gzipped archive.
79-
80-
$(NPM_TARBALL):
76+
# @private
77+
#/
78+
$(npm_tarball):
8179
$(QUIET) $(MKDIR_RECURSIVE) $(NPM_TARBALL_BUILD_OUT)
8280
$(QUIET) $(NPM_PACK) $(ROOT_DIR) >/dev/null
8381
$(QUIET) mv $(ROOT_DIR)/$(npm_tarball_basename) $@
8482

85-
86-
# Generate an npm tarball.
83+
#/
84+
# Generates a gzipped archive for publishing to npm.
8785
#
88-
# This target generates an npm gzipped archive.
89-
90-
npm-tarball: $(NPM_TARBALL)
86+
# @example
87+
# make npm-tarball
88+
#/
89+
npm-tarball: $(npm_tarball)
9190

9291
.PHONY: npm-tarball
9392

94-
95-
# Run pre-version tasks.
96-
#
97-
# This target runs tasks which should be completed before incrementing the project version.
93+
#/
94+
# Performs checks to prevent unintended behavior when attempting to publish to npm.
9895
#
9996
# TODO: once we have a `master` branch, swap `develop` for `master`
100-
101-
npm-pre-version: dedupe-node-modules
97+
#
98+
# @example
99+
# make npm-publish-check
100+
#/
101+
npm-publish-check:
102102
$(QUIET) if [[ "$(shell $(GIT_BRANCH))" != "develop" ]]; then \
103103
echo 'Error: invalid operation. New versions should only be performed on the `develop`'; \
104104
echo 'branch.'; \
105105
exit 1; \
106106
fi
107107

108-
.PHONY: npm-pre-version
108+
.PHONY: npm-publish-check
109109

110110

111111
# Run pre-patch tasks.
@@ -185,9 +185,8 @@ npm-version-pre-release: npm-pre-version
185185
# TODO: move recipe guts to a script
186186
# TODO: on version, regenerate SVG equations and update README equation elements
187187

188-
npm-version: dist-browser-bundles update-dist-readme-browser-bundle-stats
189-
$(QUIET) $(MAKE) -f $(this_file) list-pkgs-installed-logical-tree-json > $(DIST_DIR)/npm_ls.json && \
190-
$(GIT_ADD) -A dist && \
188+
npm-version: dist-browser-bundles
189+
$(QUIET) $(GIT_ADD) -A dist && \
191190
$(GIT_COMMIT) -m 'Update distributable browser bundles' && \
192191
$(MAKE) -f $(this_file) $(npm_version_target) && \
193192
$(MAKE) -f $(this_file) npm-post-version
@@ -213,12 +212,12 @@ npm-post-version:
213212

214213
.PHONY: npm-post-version
215214

216-
215+
#/
217216
# Remove npm tarball(s).
218217
#
219218
# This target removes npm gzipped archives.
220-
219+
#/
221220
clean-npm-tarball:
222-
$(QUIET) -rm -f $(NPM_TARBALL_BUILD_OUT)/*.tgz
221+
$(QUIET) $(DELETE) $(DELETE_FLAGS) $(NPM_TARBALL_BUILD_OUT)/*.tgz
223222

224223
.PHONY: clean-npm-tarball

tools/make/lib/node/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
include $(TOOLS_MAKE_LIB_DIR)/node/addons.mk
2222
include $(TOOLS_MAKE_LIB_DIR)/node/modules.mk
23-
include $(TOOLS_MAKE_LIB_DIR)/node/npm.mk
2423

2524

2625
# TARGETS #

0 commit comments

Comments
 (0)