Updated deps, migrate sveltekit to vitest config

This commit is contained in:
endigo9740
2022-07-27 11:39:59 -05:00
parent 91b7afdbee
commit 8cb3bf1b54
5 changed files with 1665 additions and 730 deletions

2363
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -4,12 +4,12 @@
"description": "A SvelteKit component library.", "description": "A SvelteKit component library.",
"author": "endigo9740 <csimmons@brainandbonesllc.com>", "author": "endigo9740 <csimmons@brainandbonesllc.com>",
"scripts": { "scripts": {
"dev": "svelte-kit dev --port 3000", "dev": "vite dev --port 3000",
"build": "svelte-kit build", "build": "vite build",
"package": "svelte-kit package", "package": "svelte-kit package",
"patch-package": "npm version patch && svelte-kit package", "patch-package": "npm version patch && svelte-kit package",
"publish": "npm publish ./package", "publish": "npm publish ./package",
"preview": "svelte-kit preview", "preview": "vite preview",
"check": "svelte-check --tsconfig ./tsconfig.json", "check": "svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch", "check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --ignore-path .gitignore --check --plugin-search-dir=. . && eslint --ignore-path .gitignore .", "lint": "prettier --ignore-path .gitignore --check --plugin-search-dir=. . && eslint --ignore-path .gitignore .",
@@ -43,6 +43,7 @@
"tailwindcss": "^3.0.24", "tailwindcss": "^3.0.24",
"tslib": "^2.4.0", "tslib": "^2.4.0",
"typescript": "~4.5.4", "typescript": "~4.5.4",
"vite": "^3.0.3",
"vitest": "^0.7.13", "vitest": "^0.7.13",
"vitest-svelte-kit": "0.0.6" "vitest-svelte-kit": "0.0.6"
}, },

View File

@@ -3,12 +3,12 @@
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="description" content="" /> <meta name="description" content="" />
<link rel="icon" href="%svelte.assets%/favicon.png" /> <link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
%svelte.head% %sveltekit.head%
</head> </head>
<body> <body>
%svelte.body% %sveltekit.body%
</body> </body>
<!-- Google Analytics --> <!-- Google Analytics -->

View File

@@ -1,7 +1,6 @@
// import adapter from '@sveltejs/adapter-auto'; // import adapter from '@sveltejs/adapter-auto';
import adapter from '@sveltejs/adapter-static'; import adapter from '@sveltejs/adapter-static';
import preprocess from 'svelte-preprocess'; import preprocess from 'svelte-preprocess';
import { configDefaults } from 'vitest/config'
/** @type {import('@sveltejs/kit').Config} */ /** @type {import('@sveltejs/kit').Config} */
const config = { const config = {
@@ -21,11 +20,7 @@ const config = {
fallback:'index.html', // index.html (SPA) | null (SSR) fallback:'index.html', // index.html (SPA) | null (SSR)
precompress: false precompress: false
}), }),
vite: { // vite: { ...moved to vite.config.js... }
test: {
exclude: [...configDefaults.exclude, './package', './build']
}
}
} }
}; };

12
vite.config.js Normal file
View File

@@ -0,0 +1,12 @@
import { sveltekit } from '@sveltejs/kit/vite';
import { configDefaults } from 'vitest/config'
/** @type {import('vite').UserConfig} */
const config = {
plugins: [sveltekit()],
test: {
exclude: [...configDefaults.exclude, './package', './build']
}
};
export default config;