Skip to content

Commit fece75c

Browse files
committed
automatically install typescript into ./node_modules if missing during build
simplifies process.
1 parent d9f5625 commit fece75c

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.github/workflows/build-test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ jobs:
1717
with:
1818
node-version: 16
1919
cache: 'npm'
20-
- run: npm ci
2120
- run: 'touch */*.ts'
2221

2322
- uses: actions/setup-go@v4

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,12 @@ fmt:
110110
tswatch:
111111
bash -c 'while true; do inotifywait -q -e close_write *.ts webadmin/*.ts webaccount/*.ts webmail/*.ts; make frontend; done'
112112

113-
install-js:
113+
node_modules/.bin/tsc:
114114
-mkdir -p node_modules/.bin
115115
npm ci
116116

117+
install-js: node_modules/.bin/tsc
118+
117119
install-js0:
118120
-mkdir -p node_modules/.bin
119121
npm install --save-dev --save-exact [email protected]
@@ -133,7 +135,7 @@ webadmin/admin.js: lib.ts webadmin/api.ts webadmin/admin.ts
133135
webaccount/account.js: lib.ts webaccount/api.ts webaccount/account.ts
134136
./tsc.sh $@ $^
135137

136-
frontend: webadmin/admin.js webaccount/account.js webmail/webmail.js webmail/msg.js webmail/text.js
138+
frontend: node_modules/.bin/tsc webadmin/admin.js webaccount/account.js webmail/webmail.js webmail/msg.js webmail/text.js
137139

138140
install-apidiff:
139141
go install golang.org/x/exp/cmd/[email protected]

develop.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ This file has notes useful for mox developers.
33
# Building & testing
44

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

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

0 commit comments

Comments
 (0)