automatically install typescript into ./node_modules if missing during build

simplifies process.
This commit is contained in:
Mechiel Lukkien 2024-04-24 19:48:01 +02:00
parent d9f5625a89
commit fece75cfe7
No known key found for this signature in database
3 changed files with 7 additions and 7 deletions

View file

@ -17,7 +17,6 @@ jobs:
with: with:
node-version: 16 node-version: 16
cache: 'npm' cache: 'npm'
- run: npm ci
- run: 'touch */*.ts' - run: 'touch */*.ts'
- uses: actions/setup-go@v4 - uses: actions/setup-go@v4

View file

@ -110,10 +110,12 @@ fmt:
tswatch: tswatch:
bash -c 'while true; do inotifywait -q -e close_write *.ts webadmin/*.ts webaccount/*.ts webmail/*.ts; make frontend; done' 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 -mkdir -p node_modules/.bin
npm ci npm ci
install-js: node_modules/.bin/tsc
install-js0: install-js0:
-mkdir -p node_modules/.bin -mkdir -p node_modules/.bin
npm install --save-dev --save-exact typescript@5.1.6 npm install --save-dev --save-exact typescript@5.1.6
@ -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 webaccount/account.js: lib.ts webaccount/api.ts webaccount/account.ts
./tsc.sh $@ $^ ./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: install-apidiff:
go install golang.org/x/exp/cmd/apidiff@v0.0.0-20231206192017-f3f8817b8deb go install golang.org/x/exp/cmd/apidiff@v0.0.0-20231206192017-f3f8817b8deb

View file

@ -3,10 +3,9 @@ This file has notes useful for mox developers.
# Building & testing # Building & testing
For a full build, you'll need a recent Go compiler/toolchain and nodejs/npm for 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 the frontend. Run "make build" to do a full build. Run "make test" to run the
install-js". Then run "make build" to do a full build. Run "make test" to run test suite. With docker installed, you can run "make test-integration" to start
the test suite. With docker installed, you can run "make test-integration" to up a few mox instances, a dns server, a postfix instance, and send email
start up a few mox instances, a dns server, a postfix instance, and send email
between them. between them.
The mox localserve command is a convenient way to test locally. Most of the The mox localserve command is a convenient way to test locally. Most of the