Skip to content

Commit

Permalink
chore: migrate to a sv template
Browse files Browse the repository at this point in the history
  • Loading branch information
hyunbinseo committed Nov 23, 2024
1 parent 3e32ade commit 837751d
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 32 deletions.
17 changes: 14 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
.DS_Store
node_modules

# Output
.output
.vercel
/.svelte-kit
/build
/dist
/.svelte-kit
/package

# OS
.DS_Store
Thumbs.db

# Env
.env
.env.*
!.env.example
!.env.test

# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
14 changes: 12 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,17 @@
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"overrides": [
{ "files": "*.svelte", "options": { "parser": "svelte" } },
{ "files": "*.md", "options": { "useTabs": false } }
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
},
{
"files": "*.md",
"options": {
"useTabs": false
}
}
]
}
36 changes: 19 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "svelte-html-modal",
"description": "Svelte modal component that utilizes the HTML dialog element",
"version": "3.0.0-next.8",
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build && node --run package",
Expand All @@ -12,9 +11,26 @@
"prepublishOnly": "node --run package",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"test": "vitest",
"format": "prettier --write .",
"lint": "prettier --check . && eslint .",
"format": "prettier --write ."
"test": "vitest"
},
"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": {
"@sveltejs/kit": "^2.5.24",
Expand All @@ -41,25 +57,11 @@
"publint": "^0.2.12",
"svelte": "^5.2.7",
"svelte-check": "^4.1.0",
"tslib": "^2.8.1",
"typescript": "^5.7.2",
"typescript-eslint": "^8.15.0",
"vite": "^5.4.11",
"vitest": "^2.1.5"
},
"exports": {
".": {
"types": "./dist/index.d.ts",
"svelte": "./dist/index.js"
}
},
"svelte": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist",
"!dist/**/*.test.*",
"!dist/**/*.spec.*"
],
"repository": {
"type": "git",
"url": "git+https://github.com/hyunbinseo/svelte-html-modal.git"
Expand Down
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

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

3 changes: 2 additions & 1 deletion src/app.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// See https://kit.svelte.dev/docs/types#app
// 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 {}
}
}
Expand Down
8 changes: 4 additions & 4 deletions svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';

/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
// Consult https://svelte.dev/docs/kit/integrations
// for more information about preprocessors
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-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()
}
};
Expand Down
7 changes: 5 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
import { defineConfig } from 'vitest/config';

export default defineConfig({
plugins: [sveltekit()]
plugins: [sveltekit()],
test: {
include: ['src/**/*.{test,spec}.{js,ts}']
}
});

0 comments on commit 837751d

Please sign in to comment.