Skip to content

Commit 021dba3

Browse files
committed
Add rule
1 parent 61e5c33 commit 021dba3

1 file changed

Lines changed: 17 additions & 3 deletions

File tree

tools/make/lib/bundle/browser.mk

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ DIST_VERIFY_VERSIONS ?= NODE_PATH="$(NODE_PATH)" $(NODE) \
4343
# @example
4444
# make dist-bundles
4545
#/
46-
dist-bundles: $(NODE_MODULES)
46+
dist-bundles: $(NODE_MODULES) clean-dist
4747
$(QUIET) echo 'Generating distributable bundles...'
4848
$(QUIET) $(DIST_BUILD_SCRIPTS) | grep '^[\/]\|^[a-zA-Z]:[/\]' | while read -r file; do \
4949
echo ""; \
@@ -64,7 +64,7 @@ dist-bundles: $(NODE_MODULES)
6464
# @example
6565
# make publish-dist-bundles
6666
#/
67-
publish-dist-bundles: $(NODE_MODULES)
67+
publish-dist-bundles: dist-bundles
6868
$(QUIET) $(DIST_UPDATE_VERSIONS)
6969
$(QUIET) $(DIST_VERIFY_VERSIONS)
7070
$(QUIET) $(DIST_PKG_DIRS) | grep '^[\/]\|^[a-zA-Z]:[/\]' | while read -r pkg; do \
@@ -74,5 +74,19 @@ publish-dist-bundles: $(NODE_MODULES)
7474
$(NPM) publish --access public || exit 1; \
7575
done
7676

77-
7877
.PHONY: publish-dist-bundles
78+
79+
#/
80+
# Removes distributable bundle build artifacts.
81+
#
82+
# @example
83+
# make clean-dist
84+
#/
85+
clean-dist:
86+
$(QUIET) $(DIST_PKG_DIRS) | grep '^[\/]\|^[a-zA-Z]:[/\]' | while read -r pkg; do \
87+
echo ""; \
88+
echo "Removing build artifacts for package: $$pkg"; \
89+
rm -rf $$pkg/build || exit 1; \
90+
done
91+
92+
.PHONY: clean-dist

0 commit comments

Comments
 (0)