Skip to content

Commit

Permalink
Better express dependencies between local build/run steps
Browse files Browse the repository at this point in the history
Refs: #2017
  • Loading branch information
erkannt committed Oct 11, 2024
1 parent 972f052 commit 0297769
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: check start start-services format lint-css lint-ts typecheck test test-fast test-integration update-snapshots test-integration-image
.PHONY: check start start-app start-services format lint-css lint-ts typecheck test test-fast test-integration update-snapshots test-integration-image

INTEGRATION_TEST_IMAGE_TAG=prereview.org-integration-tests

Expand All @@ -11,8 +11,22 @@ node_modules: package.json package-lock.json

check: format lint-ts lint-css typecheck test-fast

start: .env node_modules start-services
REDIS_URI=redis://$(shell docker compose port redis 6379) SMTP_URI=smtp://$(shell docker compose port mailcatcher 1025) npm start
src/locales: $(shell find locales -type f)
echo 'building locales'
scripts/intlc.sh
touch src/locales

src/manifest.json: src/locales $(shell find assets -type f | grep -v assets/locales)
npx webpack build --mode development
touch src/manifest.json

start-app: .env node_modules start-services src/manifest.json
REDIS_URI=redis://$(shell docker compose port redis 6379) \
SMTP_URI=smtp://$(shell docker compose port mailcatcher 1025) \
npx tsx watch --clear-screen=false --include=src/manifest.json --require dotenv/config src/index.ts

start:
find locales assets -type f | grep --invert-match assets/locales | entr -r make start-app

.dev/server.crt .dev/server.key: SHELL := /usr/bin/env bash
.dev/server.crt .dev/server.key: .env
Expand Down

0 comments on commit 0297769

Please sign in to comment.