diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e4f771..a84cc44 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,5 +28,7 @@ jobs: run: npm run test - name: Build run: npm run build + - name: Build (CI) + run: npm run build:ci - name: i18n_extract run: npm run i18n_extract \ No newline at end of file diff --git a/Makefile b/Makefile index 1eaa7bb..a21548c 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,9 @@ build: done' sh {} + tsc-alias -p tsconfig.build.json +build-ci: + SITE_CONFIG_PATH=site.config.ci.tsx openedx build + # turbo.site.json is the standalone turbo config for this package. It is # renamed to avoid conflicts with turbo v2's workspace validation, which # rejects root task syntax (//#) and requires "extends" in package-level diff --git a/dev/index.tsx b/dev/index.tsx index 007a2ae..b1bb2ef 100644 --- a/dev/index.tsx +++ b/dev/index.tsx @@ -20,7 +20,7 @@ window.open = (url, target, features) => { return originalWindowOpen(url, target, features); }; -const devApp: App = { +export const devApp: App = { appId: 'notifications-dev-site', routes: [{ path: '/', @@ -39,5 +39,3 @@ const devApp: App = { element: , }], }; - -export default devApp; diff --git a/package.json b/package.json index 12bf39a..77deb40 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ }, "scripts": { "build": "make build", + "build:ci": "make build-ci", "build:packages": "make build-packages", "clean": "make clean", "clean:packages": "make clean-packages", diff --git a/site.config.ci.tsx b/site.config.ci.tsx new file mode 100644 index 0000000..3df1005 --- /dev/null +++ b/site.config.ci.tsx @@ -0,0 +1,24 @@ +import { EnvironmentTypes, SiteConfig, footerApp, headerApp, shellApp } from '@openedx/frontend-base'; + +import { notificationsApp } from './src'; + +import '@openedx/frontend-base/shell/style'; + +const siteConfig: SiteConfig = { + siteId: 'notifications-ci', + siteName: 'Notifications (CI)', + baseUrl: 'http://apps.local.openedx.io', + lmsBaseUrl: 'http://local.openedx.io', + loginUrl: 'http://local.openedx.io/login', + logoutUrl: 'http://local.openedx.io/logout', + + environment: EnvironmentTypes.PRODUCTION, + apps: [ + shellApp, + headerApp, + footerApp, + notificationsApp, + ], +}; + +export default siteConfig; diff --git a/site.config.dev.tsx b/site.config.dev.tsx index 06b49d0..4c0f8d0 100644 --- a/site.config.dev.tsx +++ b/site.config.dev.tsx @@ -6,8 +6,8 @@ import { shellApp, } from '@openedx/frontend-base'; -import notificationsApp from './src/app'; -import devApp from './dev'; +import { notificationsApp } from './src'; +import { devApp } from './dev'; import '@openedx/frontend-base/shell/style'; diff --git a/site.config.test.tsx b/site.config.test.tsx index 3d35b37..b260c37 100644 --- a/site.config.test.tsx +++ b/site.config.test.tsx @@ -1,6 +1,6 @@ import type { SiteConfig } from '@openedx/frontend-base'; -import notificationsApp from './src/app'; +import { notificationsApp } from './src'; const siteConfig: SiteConfig = { siteId: 'notifications-test',