Skip to content

Commit 0290e61

Browse files
committed
feat(Makefile): Add empty bundle-pre target for customization.
The empty bundle-pre target is run before the bundle target and can be overwritten in extending projects to add some tasks before bundle generation. This can be used to unlink and reinstall any dependencies before bundle generation.
1 parent 5a77d6d commit 0290e61

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,16 @@ check:: stamp-yarn eslint
3535
$(YARN) run test
3636

3737

38+
bundle-pre:
39+
@# Override this in your project to add some tasks before the bundle is built.
40+
@# Example: Unlink any linked dependencies.
41+
@# bundle-pre:
42+
@# -yarn unlink @patternslib/patternslib
43+
@# yarn install --force
44+
45+
3846
.PHONY: bundle
39-
bundle: stamp-yarn
47+
bundle: bundle-pre stamp-yarn
4048
ifneq "$(PACKAGE_NAME)" "$(PACKAGE_DEV)"
4149
@# Do not build a bundle for @patternslib/dev
4250
$(YARN) run build

0 commit comments

Comments
 (0)