mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
4dc6e35c24
This change bundles the static assets like we have for v1 - using the [`embed`](https://pkg.go.dev/embed) go package. Fixes #22 In addition, it sets up a development script that runs `coderd` locally and serves the front-end, with hot-reloading. The script used is `./develop.sh`:  > NOTE: The UI is still placeholder, of course. Need to start testing out a simple, placeholder flow for the new v2 world as a next step Summary of changes: - Add build steps for `go` in the `Makefile` - Add a step for production build, in which we use the `embed` tag - Add a step for development, which doesn't need the `embed` tag - so we don't need to build the front-end twice - Add `next export` build step to output front-end artifacts in `out` - Add a `site` package for `go` - Add `embed_static.go` and `embed.go`. This is mostly brought in as-is from v1, except removing some intercom/sentry CSP entries that we aren't using. - Add a [next development server](https://nextjs.org/docs/advanced-features/custom-server) - Add a `v2-dev` script, that runs `coderd` and the `next` dev server side-by-side - Use the `site` package as the fallback handler. - Add `.gitignore` entries for additional build collateral
24 lines
921 B
Plaintext
24 lines
921 B
Plaintext
###############################################################################
|
|
# NOTICE #
|
|
# If you change this file, kindly copy-pasta your change into .prettierignore #
|
|
# and .eslintignore as well. See the following discussions to understand why #
|
|
# we have to resort to this duplication (at least for now): #
|
|
# #
|
|
# https://github.com/prettier/prettier/issues/8048 #
|
|
# https://github.com/prettier/prettier/issues/8506 #
|
|
# https://github.com/prettier/prettier/issues/8679 #
|
|
###############################################################################
|
|
|
|
node_modules
|
|
vendor
|
|
.eslintcache
|
|
yarn-error.log
|
|
|
|
# Front-end ignore
|
|
.next/
|
|
site/.next/
|
|
coverage/
|
|
|
|
# Build
|
|
bin/
|
|
site/out/ |