diff --git a/buildspec.yml b/buildspec.yml new file mode 100644 index 0000000000..79057cf8ce --- /dev/null +++ b/buildspec.yml @@ -0,0 +1,37 @@ +version: 0.2 +phases: + install: + runtime-versions: + nodejs: 22 + commands: + - echo "Installing pnpm..." + - npm install -g pnpm@latest-10 + - pnpm install --frozen-lockfile + + pre_build: + commands: + - echo "=== Debugging Library Build ===" + - ls -la packages/geoadmin-tooltip/dist + - ls -la packages/geoadmin-log/dist + - echo "Pre-build phase..." + - pnpm run build-libs:dev + + build: + commands: + - echo "Building viewer package..." + - cd packages/viewer + - echo "Listing @geoadmin dependencies in node_modules..." + - ls -l node_modules/@geoadmin + - echo "Running vue-tsc to check TypeScript paths..." + - pnpm vue-tsc -p tsconfig.json + - echo "Running build..." + - pnpm run build:dev + + post_build: + commands: + - echo "=== Linting formatting ===" + - pnpm -w run lint:no-fix + +artifacts: + files: + - '**/*' \ No newline at end of file diff --git a/package.json b/package.json index bb015b3de3..db4257cbcf 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "scripts": { "build": "pnpm run --recursive build", "build-libs": "pnpm --filter=!web-mapviewer run --recursive build", - "build:dev": "pnpm --recursive run build:dev", + "build:dev": "pnpm run build-libs:dev && pnpm --filter=web-mapviewer run build:dev", + "build-libs:dev": "pnpm --filter=!web-mapviewer run --recursive build:dev", "build:dev:watch": "pnpm --filter=!web-mapviewer --recursive --parallel --if-present run build:dev:watch", "build:int": "pnpm --recursive run build:int", "build:prod": "pnpm --recursive run build:prod", @@ -84,4 +85,4 @@ "sharp" ] } -} +} \ No newline at end of file diff --git a/packages/geoadmin-coordinates/tsconfig.json b/packages/geoadmin-coordinates/tsconfig.json index 7b8ecd91fc..d1c53cb290 100644 --- a/packages/geoadmin-coordinates/tsconfig.json +++ b/packages/geoadmin-coordinates/tsconfig.json @@ -1,3 +1,13 @@ { - "extends": "../../tsconfig.shared.json" + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipLibCheck": true + }, + "references": [ + { "path": "../geoadmin-log" }, + { "path": "../geoadmin-numbers" } + ] } diff --git a/packages/geoadmin-coordinates/vite.config.js b/packages/geoadmin-coordinates/vite.config.js index 77cf08bece..f98ce63f96 100644 --- a/packages/geoadmin-coordinates/vite.config.js +++ b/packages/geoadmin-coordinates/vite.config.js @@ -19,7 +19,12 @@ export default { '@': fileURLToPath(new URL('./src', import.meta.url)), }, }, - plugins: [dts()], + plugins: [ + dts({ + outDir: 'dist', + entryRoot: 'src', + }), + ], test: { setupFiles: ['setup-vitest.ts'], }, diff --git a/packages/geoadmin-elevation-profile/src/GeoadminElevationProfileCesiumBridge.vue b/packages/geoadmin-elevation-profile/src/GeoadminElevationProfileCesiumBridge.vue index 6d92f15978..554a237b7e 100644 --- a/packages/geoadmin-elevation-profile/src/GeoadminElevationProfileCesiumBridge.vue +++ b/packages/geoadmin-elevation-profile/src/GeoadminElevationProfileCesiumBridge.vue @@ -1,4 +1,5 @@