tailscale/cmd/tsconnect
Mihai Parparita b763a12331 cmd/tsconnect: allow building static resources in a different directory
When using tsconnect as a module in another repo, we cannot write to
the ./dist directory (modules directories are read-only by default -
there is a -modcacherw flag for `go get` but we can't count on it).

We add a -distdir flag that is honored by both the build and serve
commands for where to place output in.

Somewhat tedious because esbuild outputs paths relative to the working
directory, so we need to do some extra munging to make them relative
to the output directory.

Signed-off-by: Mihai Parparita <mihai@tailscale.com>
2022-07-20 10:14:43 -07:00
..
dist cmd/tsconnect: initial scaffolding for Tailscale Connect browser client 2022-07-19 13:43:08 -07:00
src cmd/tsconnect: initial scaffolding for Tailscale Connect browser client 2022-07-19 13:43:08 -07:00
wasm cmd/tsconnect: initial scaffolding for Tailscale Connect browser client 2022-07-19 13:43:08 -07:00
.gitignore cmd/tsconnect: initial scaffolding for Tailscale Connect browser client 2022-07-19 13:43:08 -07:00
build.go cmd/tsconnect: allow building static resources in a different directory 2022-07-20 10:14:43 -07:00
common.go cmd/tsconnect: allow building static resources in a different directory 2022-07-20 10:14:43 -07:00
dev.go cmd/tsconnect: initial scaffolding for Tailscale Connect browser client 2022-07-19 13:43:08 -07:00
index.html cmd/tsconnect: initial scaffolding for Tailscale Connect browser client 2022-07-19 13:43:08 -07:00
package.json cmd/tsconnect: initial scaffolding for Tailscale Connect browser client 2022-07-19 13:43:08 -07:00
serve.go cmd/tsconnect: allow building static resources in a different directory 2022-07-20 10:14:43 -07:00
tsconnect.go cmd/tsconnect: allow building static resources in a different directory 2022-07-20 10:14:43 -07:00
yarn.lock cmd/tsconnect: initial scaffolding for Tailscale Connect browser client 2022-07-19 13:43:08 -07:00