Skip to content

Commit

Permalink
svelte-package finally works
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugos68 committed Dec 31, 2024
1 parent d06e177 commit 2a20a38
Show file tree
Hide file tree
Showing 49 changed files with 1,252 additions and 1,722 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@

# Artifacts
node_modules
dist
dist
.svelte-kit
3 changes: 3 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"files": {
"ignore": ["dist", ".svelte-kit"]
},
"overrides": [
{
"include": ["*.svelte"],
Expand Down
28 changes: 28 additions & 0 deletions packages/documentation/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "documentation",
"private": true,
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^4.0.0",
"autoprefixer": "^10.4.20",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"tailwindcss": "^3.4.9",
"typescript": "^5.0.0",
"vite": "^5.4.11"
},
"dependencies": {
"@tailwindcss/forms": "^0.5.9",
"@tailwindcss/typography": "^0.5.15"
}
}
6 changes: 6 additions & 0 deletions packages/documentation/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
3 changes: 3 additions & 0 deletions packages/documentation/src/app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";
13 changes: 13 additions & 0 deletions packages/documentation/src/app.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// See https://svelte.dev/docs/kit/types#app.d.ts
// for information about these interfaces
declare global {
namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface PageState {}
// interface Platform {}
}
}

export {};
12 changes: 12 additions & 0 deletions packages/documentation/src/app.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>
1 change: 1 addition & 0 deletions packages/documentation/src/lib/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// place files you want to import through the `$lib` alias in this folder.
6 changes: 6 additions & 0 deletions packages/documentation/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<script lang="ts">
import "../app.css";
let { children } = $props();
</script>

{@render children()}
2 changes: 2 additions & 0 deletions packages/documentation/src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1>Welcome to SvelteKit</h1>
<p>Visit <a href="https://svelte.dev/docs/kit">svelte.dev/docs/kit</a> to read the documentation</p>
Binary file added packages/documentation/static/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions packages/documentation/svelte.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import adapter from "@sveltejs/adapter-auto";
import { vitePreprocess } from "@sveltejs/vite-plugin-svelte";

/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://svelte.dev/docs/kit/integrations
// for more information about preprocessors
preprocess: vitePreprocess(),

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

export default config;
13 changes: 13 additions & 0 deletions packages/documentation/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import forms from "@tailwindcss/forms";
import typography from "@tailwindcss/typography";
import type { Config } from "tailwindcss";

export default {
content: ["./src/**/*.{html,js,svelte,ts}"],

theme: {
extend: {},
},

plugins: [typography, forms],
} satisfies Config;
19 changes: 19 additions & 0 deletions packages/documentation/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"moduleResolution": "bundler"
}
// Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
// except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
//
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
// from the referenced tsconfig.json - TypeScript does not merge them in
}
6 changes: 6 additions & 0 deletions packages/documentation/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { sveltekit } from "@sveltejs/kit/vite";
import { defineConfig } from "vite";

export default defineConfig({
plugins: [sveltekit()],
});
34 changes: 23 additions & 11 deletions packages/floating-ui-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,40 @@
"name": "@skeletonlabs/floating-ui-svelte",
"version": "0.3.2",
"scripts": {
"build": "vitest build",
"build:watch": "vitest dev",
"build": "svelte-package",
"build:watch": "svelte-package --watch",
"test": "vitest run",
"test:watch": "vitest run --watch"
},
"files": ["dist", "!dist/**/*.test.*", "!dist/**/*.spec.*"],
"sideEffects": ["**/*.css"],
"svelte": "./dist/index.js",
"types": "./dist/index.d.ts",
"type": "module",
"exports": {
".": {
"types": "./dist/index.d.ts",
"svelte": "./dist/index.js"
}
},
"peerDependencies": {
"svelte": ">=5.0.0"
"svelte": "^5.0.0"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "catalog:",
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/package": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^4.0.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/svelte": "^5.2.6",
"@testing-library/user-event": "^14.5.2",
"csstype": "^3.1.3",
"jsdom": "^25.0.1",
"typescript": "catalog:",
"vite": "catalog:",
"vitest": "catalog:"
"svelte": "^5.0.0",
"typescript": "^5.0.0",
"vite": "^5.4.11",
"vitest": "^2.1.8"
},
"dependencies": {
"@floating-ui/dom": "^1.6.12",
"@floating-ui/utils": "^0.2.8"
},
"type": "module"
}
}
Loading

0 comments on commit 2a20a38

Please sign in to comment.