From f8f7422dd21f427414ba8bfd255b0e745a2bfd9e Mon Sep 17 00:00:00 2001 From: Frederic Heem Date: Mon, 11 Nov 2024 13:34:01 -0300 Subject: [PATCH] publish rest-contries --- examples/rest-countries/package.json | 5 ++++- examples/rest-countries/src/main.ts | 5 ++++- examples/rest-countries/vite.config.js | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/examples/rest-countries/package.json b/examples/rest-countries/package.json index fcf46d9d..06519339 100644 --- a/examples/rest-countries/package.json +++ b/examples/rest-countries/package.json @@ -1,14 +1,17 @@ { "name": "frontendmentor-rest-countries", + "homepage": "https://grucloud.github.io/bau/frontendmentor/rest-countries/", "private": true, "version": "0.86.0", "type": "module", "scripts": { "dev": "vite", "build": "tsc && vite build", - "preview": "vite preview" + "preview": "vite preview", + "deploy": "gh-pages -d ../../dist" }, "devDependencies": { + "gh-pages": "6.1.1", "typescript": "^5.0.2", "vite": "^5.2.11" }, diff --git a/examples/rest-countries/src/main.ts b/examples/rest-countries/src/main.ts index ce3264e1..6d373ed9 100644 --- a/examples/rest-countries/src/main.ts +++ b/examples/rest-countries/src/main.ts @@ -5,12 +5,15 @@ import { layoutDefault } from "./layoutDefault"; import { createRoutes } from "./routes"; import "./style.css"; -const context = createContext(); +const config = { base: "/bau/frontendmentor/rest-countries" }; + +const context = createContext({ config }); BauRouter({ routes: createRoutes({ context }), onLocationChange: onLocationChange({ context, + config, LayoutDefault: layoutDefault(context), }), //notFoundRoute: notFoundRouteDefault(context), diff --git a/examples/rest-countries/vite.config.js b/examples/rest-countries/vite.config.js index 41713bec..b6d32338 100644 --- a/examples/rest-countries/vite.config.js +++ b/examples/rest-countries/vite.config.js @@ -2,6 +2,8 @@ import { defineConfig } from "vite"; export default defineConfig(({ command, mode, ssrBuild }) => { return { + base: "/bau/frontendmentor/rest-countries/", + build: { outDir: "../../dist/frontendmentor/rest-countries" }, server: { open: true, },