Skip to content

Commit

Permalink
build frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
timephy committed May 28, 2024
1 parent 55e6f50 commit dab7bd3
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 17 deletions.
4 changes: 2 additions & 2 deletions packages/tui-components-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "",
"homepage": "https://github.com/timephy/tui/tree/main/tui-components-svelte#readme",
"scripts": {
"clean": "rm -rf dist/ .svelte-kit/",
"clean": "rm -rf dist/ .svelte-kit/ build/",
"dev": "vite dev",
"build": "vite build && svelte-package",
"check:publish": "pnpm run lint && pnpm run build && publint",
Expand All @@ -26,7 +26,7 @@
"author": "",
"license": "MIT",
"devDependencies": {
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/adapter-static": "^3.0.1",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/package": "^2.3.1",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
Expand Down
3 changes: 3 additions & 0 deletions packages/tui-components-svelte/src/routes/+layout.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const prerender = true
export const ssr = true
export const csr = true
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,6 @@
<div class="card card-p">abc</div>
<div class="card card-p">abc</div>
<Icon data={gear_wide_connected}></Icon>
<h1 id="_">_</h1>
</div>
</div>
12 changes: 7 additions & 5 deletions packages/tui-components-svelte/svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import adapter from "@sveltejs/adapter-auto"
import adapter from "@sveltejs/adapter-static"
import { vitePreprocess } from "@sveltejs/vite-plugin-svelte"

/** @type {import('@sveltejs/kit').Config} */
Expand All @@ -8,10 +8,12 @@ const config = {
preprocess: vitePreprocess(),

kit: {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: adapter(),
adapter: adapter({
strict: true,
fallback: "index.html",
pages: "build",
precompress: true,
}),
},
}

Expand Down
3 changes: 1 addition & 2 deletions packages/tui-components-svelte/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"moduleResolution": "bundler"
"strict": true
}
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
// except $lib which is handled by https://kit.svelte.dev/docs/configuration#files
Expand Down
16 changes: 8 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit dab7bd3

Please sign in to comment.