Skip to content

Commit

Permalink
automatically install typescript into ./node_modules if missing durin…
Browse files Browse the repository at this point in the history
…g build

simplifies process.
  • Loading branch information
mjl- committed Apr 24, 2024
1 parent d9f5625 commit fece75c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
with:
node-version: 16
cache: 'npm'
- run: npm ci
- run: 'touch */*.ts'

- uses: actions/setup-go@v4
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,12 @@ fmt:
tswatch:
bash -c 'while true; do inotifywait -q -e close_write *.ts webadmin/*.ts webaccount/*.ts webmail/*.ts; make frontend; done'

install-js:
node_modules/.bin/tsc:
-mkdir -p node_modules/.bin
npm ci

install-js: node_modules/.bin/tsc

install-js0:
-mkdir -p node_modules/.bin
npm install --save-dev --save-exact [email protected]
Expand All @@ -133,7 +135,7 @@ webadmin/admin.js: lib.ts webadmin/api.ts webadmin/admin.ts
webaccount/account.js: lib.ts webaccount/api.ts webaccount/account.ts
./tsc.sh $@ $^

frontend: webadmin/admin.js webaccount/account.js webmail/webmail.js webmail/msg.js webmail/text.js
frontend: node_modules/.bin/tsc webadmin/admin.js webaccount/account.js webmail/webmail.js webmail/msg.js webmail/text.js

install-apidiff:
go install golang.org/x/exp/cmd/[email protected]
Expand Down
7 changes: 3 additions & 4 deletions develop.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ This file has notes useful for mox developers.
# Building & testing

For a full build, you'll need a recent Go compiler/toolchain and nodejs/npm for
the frontend. First install frontend dependencies (typescript) with "make
install-js". Then run "make build" to do a full build. Run "make test" to run
the test suite. With docker installed, you can run "make test-integration" to
start up a few mox instances, a dns server, a postfix instance, and send email
the frontend. Run "make build" to do a full build. Run "make test" to run the
test suite. With docker installed, you can run "make test-integration" to start
up a few mox instances, a dns server, a postfix instance, and send email
between them.

The mox localserve command is a convenient way to test locally. Most of the
Expand Down

0 comments on commit fece75c

Please sign in to comment.