Skip to content

Commit 9de2d28

Browse files
committed
maint: Makefile: Let the install target depend on yarn.lock file to allow reinstalls when yarn.lock changes.
1 parent d4c63b7 commit 9de2d28

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
.env
33
dist/
44
node_modules/
5-
stamp-yarn
65
stats.json
76
yarn-error.log
87
pat-*

Makefile

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,11 @@ PACKAGE_DEV=@patternslib/dev
1818
PACKAGE_NAME := $(shell node -p "require('./package.json').name")
1919
BUNDLE_NAME := $(subst @patternslib/,,$(subst @plone/,,$(PACKAGE_NAME)))
2020

21-
.PHONY: install
22-
stamp-yarn install:
21+
22+
yarn.lock install:
2323
$(YARN) install
2424
# Install pre commit hook
2525
$(YARN) husky install
26-
touch stamp-yarn
2726

2827

2928
.PHONY: clean
@@ -33,17 +32,16 @@ clean-dist:
3332

3433
.PHONY: clean
3534
clean: clean-dist
36-
rm -f stamp-yarn
3735
rm -Rf node_modules/
3836

3937

4038
.PHONY: eslint
41-
eslint: stamp-yarn
39+
eslint: install
4240
$(ESLINT) ./src
4341

4442

4543
.PHONY: check
46-
check: stamp-yarn eslint
44+
check: install eslint
4745
$(YARN) run test
4846

4947

@@ -60,7 +58,7 @@ bundle-pre:
6058
# NOTE: When using the normal workflow - e.g. `make release-minor`, the
6159
# relase-it config runs `make bundle` after the version bump.
6260
.PHONY: bundle
63-
bundle: clean-dist bundle-pre stamp-yarn
61+
bundle: clean-dist bundle-pre install
6462
ifneq "$(PACKAGE_NAME)" "$(PACKAGE_DEV)"
6563
@# Do not build a bundle for @patternslib/dev
6664
$(YARN) run build
@@ -166,7 +164,7 @@ prerelease-beta:
166164

167165

168166
.PHONY: serve
169-
serve: stamp-yarn
167+
serve: install
170168
$(YARN) run start
171169

172170

0 commit comments

Comments
 (0)