Skip to content

Commit be394c7

Browse files
committed
Add recipes for generating distributable browser bundles
1 parent b6d03dd commit be394c7

File tree

4 files changed

+59
-0
lines changed

4 files changed

+59
-0
lines changed

tools/make/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ include $(TOOLS_MAKE_LIB_DIR)/init/Makefile
5757
# Please keep sorted in alphabetical order:
5858
include $(TOOLS_MAKE_LIB_DIR)/benchmark/Makefile
5959
include $(TOOLS_MAKE_LIB_DIR)/bib/Makefile
60+
include $(TOOLS_MAKE_LIB_DIR)/bundle/Makefile
6061
include $(TOOLS_MAKE_LIB_DIR)/complexity/Makefile
6162
include $(TOOLS_MAKE_LIB_DIR)/contributors/Makefile
6263
include $(TOOLS_MAKE_LIB_DIR)/coverage-service/Makefile

tools/make/lib/bundle/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
# DEPENDENCIES #
3+
4+
include $(TOOLS_MAKE_LIB_DIR)/bundle/browser.mk

tools/make/lib/bundle/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Bundle
2+
3+
> Bundle recipes.
4+
5+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
6+
7+
<section class="intro">
8+
9+
This directory contains [`make`][make] recipes for generating bundles and other distributable files.
10+
11+
</section>
12+
13+
<!-- /.intro -->
14+
15+
<!-- Section to include notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
16+
17+
<section class="notes">
18+
19+
</section>
20+
21+
<!-- /.notes -->
22+
23+
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
24+
25+
<section class="links">
26+
27+
[make]: https://www.gnu.org/software/make/
28+
29+
</section>
30+
31+
<!-- /.links -->

tools/make/lib/bundle/browser.mk

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
# VARIABLES #
3+
4+
# Define the command for generating distributable browser bundles:
5+
DIST_BROWSER_BUNDLES ?= $(NODE) \
6+
--max_old_space_size=4096 \
7+
--expose_gc \
8+
$(TOOLS_PKGS_DIR)/bundle/scripts/dist_browser_bundles
9+
10+
# Define the command-line options to be used when executing the command:
11+
DIST_BROWSER_BUNDLES_FLAGS ?=
12+
13+
14+
# TARGETS #
15+
16+
# Generate browser bundles.
17+
#
18+
# This target generates distributable browser bundles.
19+
20+
dist-browser-bundles: $(NODE_MODULES)
21+
$(QUIET) $(DIST_BROWSER_BUNDLES) $(DIST_BROWSER_BUNDLES_FLAGS)
22+
23+
.PHONY: dist-browser-bundles

0 commit comments

Comments
 (0)