Skip to content

Commit 0904bde

Browse files
committed
chore: convenience 'make install-local-helpers' for local dev
1 parent 3288a1b commit 0904bde

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,20 @@ fmt:
3535
test:
3636
./.ci/run-test.sh
3737

38+
# For local dev, setup each logger to use the local helpers, rather than
39+
# a version published to npm. Need to be careful to not *push* with that
40+
# tweak to each package.json.
41+
.PHONY: install-local-helpers undo-install-local-helpers
42+
install-local-helpers:
43+
(cd loggers/winston && npm install ../../helpers)
44+
(cd loggers/morgan && npm install ../../helpers)
45+
(cd loggers/pino && npm install ../../helpers)
46+
undo-install-local-helpers:
47+
export HELPERS_VER=$(shell cd helpers && npm info . version) && \
48+
(cd loggers/winston && npm install @elastic/ecs-helpers@v$$HELPERS_VER) && \
49+
(cd loggers/morgan && npm install @elastic/ecs-helpers@v$$HELPERS_VER) && \
50+
(cd loggers/pino && npm install @elastic/ecs-helpers@v$$HELPERS_VER)
51+
3852
# Build and open the rendered docs for testing.
3953
#
4054
# Requirements:

0 commit comments

Comments
 (0)