diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index 45bcbfe0..ef1015fe 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -56,6 +56,14 @@ jobs: ADMIN_URL: "//localhost:80" working-directory: "front" + - name: "Build iframe-api" + run: yarn run build-iframe-api + working-directory: "front" + + - name: "Typecheck" + run: yarn run typecheck + working-directory: "front" + - name: "Svelte check" run: yarn run svelte-check working-directory: "front" @@ -165,4 +173,3 @@ jobs: - name: "Prettier" run: yarn run pretty-check working-directory: "back" - diff --git a/.github/workflows/push-to-npm.yml b/.github/workflows/push-to-npm.yml index 750ef224..b6cf4f12 100644 --- a/.github/workflows/push-to-npm.yml +++ b/.github/workflows/push-to-npm.yml @@ -22,31 +22,10 @@ jobs: run: cat package.json working-directory: "front/packages/iframe-api-typings" - - name: Install Protoc - uses: arduino/setup-protoc@v1 - with: - version: '3.x' - - name: "Install dependencies" run: yarn install working-directory: "front" - - name: "Install messages dependencies" - run: yarn install - working-directory: "messages" - - - name: "Build proto messages" - run: yarn run ts-proto && yarn run copy-to-front-ts-proto && yarn run json-copy-to-front - working-directory: "messages" - - - name: "Create index.html" - run: ./templater.sh - working-directory: "front" - - - name: "Generate i18n files" - run: yarn run typesafe-i18n - working-directory: "front" - - name: "Build" run: yarn run build-typings env: @@ -54,13 +33,6 @@ jobs: ADMIN_URL: "//localhost:80" working-directory: "front" - # We build the front to generate the typings of iframe_api, then we copy those typings in a separate package. - - name: Copy typings to package dir - run: cp front/dist/src/iframe_api.d.ts front/packages/iframe-api-typings/iframe_api.d.ts - - - name: Copy typings to package dir (2) - run: cp -R front/dist/src/Api front/packages/iframe-api-typings/Api - - name: Install dependencies in package run: yarn install working-directory: "front/packages/iframe-api-typings" diff --git a/docker-compose.yaml b/docker-compose.yaml index 8489b336..2bbc6c0a 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -52,7 +52,6 @@ services: MAX_USERNAME_LENGTH: "$MAX_USERNAME_LENGTH" DISABLE_ANONYMOUS: "$DISABLE_ANONYMOUS" OPID_LOGIN_SCREEN_PROVIDER: "$OPID_LOGIN_SCREEN_PROVIDER" - LIVE_RELOAD: "$LIVE_RELOAD:-true" command: yarn run start volumes: - ./front:/usr/src/app diff --git a/front/.gitignore b/front/.gitignore index 16056562..b7cc8c89 100644 --- a/front/.gitignore +++ b/front/.gitignore @@ -1,16 +1,7 @@ /node_modules/ -/dist/*.js -/dist/*.js.map -/dist/*.js.LICENSE.txt -/dist/main.*.css -/dist/main.*.css.map -/dist/tests/ +dist/ /yarn-error.log /package-lock.json -/dist/webpack.config.js -/dist/webpack.config.js.map -/dist/src -/dist/fonts -/dist/*.png *.sh !templater.sh +/public/iframe_api.js diff --git a/front/dist/.gitignore b/front/dist/.gitignore deleted file mode 100644 index beb1ee19..00000000 --- a/front/dist/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -index.html -/js/ -/fonts/ -style.*.css -!env-config.template.js -*.png -!/resources/** diff --git a/front/dist/env-config.template.js b/front/dist/env-config.template.js deleted file mode 100644 index e672d7aa..00000000 --- a/front/dist/env-config.template.js +++ /dev/null @@ -1,27 +0,0 @@ -window.env = { - SKIP_RENDER_OPTIMIZATIONS: '${SKIP_RENDER_OPTIMIZATIONS}', - DISABLE_NOTIFICATIONS: '${DISABLE_NOTIFICATIONS}', - PUSHER_URL: '${PUSHER_URL}', - UPLOADER_URL: '${UPLOADER_URL}', - ADMIN_URL: '${ADMIN_URL}', - CONTACT_URL: '${CONTACT_URL}', - PROFILE_URL: '${PROFILE_URL}', - ICON_URL: '${ICON_URL}', - DEBUG_MODE: '${DEBUG_MODE}', - STUN_SERVER: '${STUN_SERVER}', - TURN_SERVER: '${TURN_SERVER}', - TURN_USER: '${TURN_USER}', - TURN_PASSWORD: '${TURN_PASSWORD}', - JITSI_URL: '${JITSI_URL}', - JITSI_PRIVATE_MODE: '${JITSI_PRIVATE_MODE}', - START_ROOM_URL: '${START_ROOM_URL}', - MAX_USERNAME_LENGTH: '${MAX_USERNAME_LENGTH}', - MAX_PER_GROUP: '${MAX_PER_GROUP}', - DISPLAY_TERMS_OF_USE: '${DISPLAY_TERMS_OF_USE}', - POSTHOG_API_KEY: '${POSTHOG_API_KEY}', - POSTHOG_URL: '${POSTHOG_URL}', - NODE_ENV: '${NODE_ENV}', - DISABLE_ANONYMOUS: '${DISABLE_ANONYMOUS}', - OPID_LOGIN_SCREEN_PROVIDER: '${OPID_LOGIN_SCREEN_PROVIDER}', - FALLBACK_LOCALE: '${FALLBACK_LOCALE}', -}; diff --git a/front/dist/iframe.html b/front/dist/iframe.html deleted file mode 100644 index 000a5dc6..00000000 --- a/front/dist/iframe.html +++ /dev/null @@ -1,22 +0,0 @@ - - -
- - - - diff --git a/front/dist/resources/fonts/fonts.css b/front/dist/resources/fonts/fonts.css deleted file mode 100644 index a3d3cf71..00000000 --- a/front/dist/resources/fonts/fonts.css +++ /dev/null @@ -1,5 +0,0 @@ -/*This file is a workaround to allow phaser to load directly this font */ -@font-face { - font-family: "Press Start 2P"; - src: url("/fonts/press-start-2p-latin-400-normal.woff2") format('woff2'); -} \ No newline at end of file diff --git a/front/iframe-api.vite.config.ts b/front/iframe-api.vite.config.ts new file mode 100644 index 00000000..3698647b --- /dev/null +++ b/front/iframe-api.vite.config.ts @@ -0,0 +1,16 @@ +import { defineConfig } from "vite"; +import { resolve } from "path"; + +export default defineConfig({ + publicDir: false, + build: { + outDir: "public", + emptyOutDir: false, + lib: { + entry: resolve(__dirname, "src/iframe_api.ts"), + name: "iframe_api", + formats: ["cjs"], + fileName: () => "iframe_api.js", + }, + }, +}); diff --git a/front/dist/index.ejs b/front/index.html similarity index 98% rename from front/dist/index.ejs rename to front/index.html index eef052fd..f6c54ad7 100644 --- a/front/dist/index.ejs +++ b/front/index.html @@ -27,8 +27,8 @@ -