feat: Initial site stub
This commit is contained in:
commit
de4b09b23e
|
@ -0,0 +1,25 @@
|
|||
.*
|
||||
!.gitignore
|
||||
|
||||
# Cache
|
||||
node_modules
|
||||
|
||||
# Output
|
||||
.output
|
||||
.vercel
|
||||
/.svelte-kit
|
||||
/build
|
||||
|
||||
# OS
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# Env
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
!.env.test
|
||||
|
||||
# Vite
|
||||
vite.config.js.timestamp-*
|
||||
vite.config.ts.timestamp-*
|
|
@ -0,0 +1,21 @@
|
|||
# Chrysoblog
|
||||
|
||||
Personal Website
|
||||
|
||||
## Developing
|
||||
|
||||
Install dependencies with `npm install` (or `pnpm install` or `yarn`). Then start the dev server with
|
||||
|
||||
```bash
|
||||
npm run dev [-- --open]
|
||||
```
|
||||
|
||||
## Building
|
||||
|
||||
To create the production version,
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
You can preview the production build with `npm run preview`.
|
|
@ -0,0 +1,33 @@
|
|||
import js from '@eslint/js';
|
||||
import ts from 'typescript-eslint';
|
||||
import svelte from 'eslint-plugin-svelte';
|
||||
import prettier from 'eslint-config-prettier';
|
||||
import globals from 'globals';
|
||||
|
||||
/** @type {import('eslint').Linter.Config[]} */
|
||||
export default [
|
||||
js.configs.recommended,
|
||||
...ts.configs.recommended,
|
||||
...svelte.configs['flat/recommended'],
|
||||
prettier,
|
||||
...svelte.configs['flat/prettier'],
|
||||
{
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.node
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
files: ['**/*.svelte'],
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
parser: ts.parser
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
ignores: ['build/', '.svelte-kit/', 'dist/']
|
||||
}
|
||||
];
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"name": "chrysoblog",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
"test": "npm run test:integration && npm run test:unit",
|
||||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
||||
"lint": "prettier --check . && eslint .",
|
||||
"format": "prettier --write .",
|
||||
"test:integration": "playwright test",
|
||||
"test:unit": "vitest"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.28.1",
|
||||
"@sveltejs/adapter-auto": "^3.0.0",
|
||||
"@sveltejs/kit": "^2.0.0",
|
||||
"@sveltejs/vite-plugin-svelte": "^3.0.0",
|
||||
"@types/eslint": "^9.6.0",
|
||||
"eslint": "^9.0.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-svelte": "^2.36.0",
|
||||
"globals": "^15.0.0",
|
||||
"prettier": "^3.1.1",
|
||||
"prettier-plugin-svelte": "^3.1.2",
|
||||
"svelte": "^4.2.7",
|
||||
"svelte-check": "^4.0.0",
|
||||
"typescript": "^5.0.0",
|
||||
"typescript-eslint": "^8.0.0",
|
||||
"vite": "^5.0.3",
|
||||
"vitest": "^2.0.0"
|
||||
},
|
||||
"type": "module"
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
import type { PlaywrightTestConfig } from '@playwright/test';
|
||||
|
||||
const config: PlaywrightTestConfig = {
|
||||
webServer: {
|
||||
command: 'npm run build && npm run preview',
|
||||
port: 4173
|
||||
},
|
||||
testDir: 'tests',
|
||||
testMatch: /(.+\.)?(test|spec)\.[jt]s/
|
||||
};
|
||||
|
||||
export default config;
|
|
@ -0,0 +1,13 @@
|
|||
// See https://kit.svelte.dev/docs/types#app
|
||||
// for information about these interfaces
|
||||
declare global {
|
||||
namespace App {
|
||||
// interface Error {}
|
||||
// interface Locals {}
|
||||
// interface PageData {}
|
||||
// interface PageState {}
|
||||
// interface Platform {}
|
||||
}
|
||||
}
|
||||
|
||||
export {};
|
|
@ -0,0 +1,12 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" href="%sveltekit.assets%/favicon.svg" />
|
||||
<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>
|
|
@ -0,0 +1,7 @@
|
|||
import { describe, it, expect } from 'vitest';
|
||||
|
||||
describe('sum test', () => {
|
||||
it('adds 1 + 2 to equal 3', () => {
|
||||
expect(1 + 2).toBe(3);
|
||||
});
|
||||
});
|
|
@ -0,0 +1 @@
|
|||
// place files you want to import through the `$lib` alias in this folder.
|
|
@ -0,0 +1,2 @@
|
|||
<h1>Home Page</h1>
|
||||
<p>This is the home page</p>
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 372.75 369.86"><defs><style>.a{fill:#7ea898;}.b{fill:#98b9ac;}.c{fill:#5e7e72;}.d{fill:#b1cbc1;}.e{fill:#7ea4a8;}</style></defs><title>logo</title><path class="a" d="M374.82,96.22a195.93,195.93,0,0,1,16,13.3,199,199,0,0,1,38.73,48.8l-24.79,14a171.37,171.37,0,0,0-33.2-41.83A174.63,174.63,0,0,0,357.85,119Z" transform="translate(-56.84 -56.84)"/><path class="a" d="M374.82,96.22l-17,22.81a169.62,169.62,0,0,0-64.51-29.62l6.22-27.76A197.51,197.51,0,0,1,374.82,96.22Z" transform="translate(-56.84 -56.84)"/><path class="a" d="M299.56,61.65l-6.22,27.76a171.18,171.18,0,0,0-71-.77l-5.62-27.91A199.82,199.82,0,0,1,299.56,61.65Z" transform="translate(-56.84 -56.84)"/><path class="b" d="M355.19,200.19l37.2-20.94a156.28,156.28,0,0,1,19.41,62.12l-42.5,4A113.46,113.46,0,0,0,355.19,200.19Z" transform="translate(-56.84 -56.84)"/><path class="b" d="M369.3,245.36l42.5-4A156.85,156.85,0,0,1,404.29,306l-40.44-13.64A113.82,113.82,0,0,0,369.3,245.36Z" transform="translate(-56.84 -56.84)"/><path class="c" d="M222.36,88.64l2.8,13.94a155.59,155.59,0,0,0-59.72,25.82l-8.25-11.61A169.73,169.73,0,0,1,222.36,88.64Z" transform="translate(-56.84 -56.84)"/><path class="c" d="M225.16,102.58l8.41,41.85a112.85,112.85,0,0,0-43.43,18.77l-24.7-34.8A155.59,155.59,0,0,1,225.16,102.58Z" transform="translate(-56.84 -56.84)"/><path class="b" d="M363.85,292.37,404.29,306A155.94,155.94,0,0,1,371.09,362l-31.38-28.89A113.48,113.48,0,0,0,363.85,292.37Z" transform="translate(-56.84 -56.84)"/><path class="c" d="M157.19,116.79l8.25,11.61a157.81,157.81,0,0,0-44.07,47.87L109.12,169a172.47,172.47,0,0,1,48.07-52.22Z" transform="translate(-56.84 -56.84)"/><path class="c" d="M165.44,128.4l24.7,34.8A114.42,114.42,0,0,0,158.08,198l-36.71-21.74a157.81,157.81,0,0,1,44.07-47.87Z" transform="translate(-56.84 -56.84)"/><path class="d" d="M371.09,362l10.47,9.64a170.33,170.33,0,0,1-57.85,41.13l-5.64-13.07A155.93,155.93,0,0,0,371.09,362Z" transform="translate(-56.84 -56.84)"/><path class="c" d="M121.37,176.27,158.08,198A113,113,0,0,0,143,242.85l-42.4-4.93A155.54,155.54,0,0,1,121.37,176.27Z" transform="translate(-56.84 -56.84)"/><path class="c" d="M109.12,169l12.25,7.26a155.54,155.54,0,0,0-20.81,61.65l-14.13-1.64A169.67,169.67,0,0,1,109.12,169Z" transform="translate(-56.84 -56.84)"/><path class="d" d="M318.07,399.66l5.64,13.07a170.79,170.79,0,0,1-69.6,14l.16-14.21A157,157,0,0,0,318.07,399.66Z" transform="translate(-56.84 -56.84)"/><path class="e" d="M58.16,233l28.27,3.3A171.33,171.33,0,0,0,93.06,307L65.9,315.45A200,200,0,0,1,58.16,233Z" transform="translate(-56.84 -56.84)"/><path class="d" d="M254.27,412.48l-.16,14.21a170.51,170.51,0,0,1-69.28-15.49l5.94-12.94A156.44,156.44,0,0,0,254.27,412.48Z" transform="translate(-56.84 -56.84)"/><path class="e" d="M65.9,315.45,93.06,307A169.78,169.78,0,0,0,127.9,368.8l-21.34,18.79A197.58,197.58,0,0,1,65.9,315.45Z" transform="translate(-56.84 -56.84)"/><path class="d" d="M190.77,398.26l-5.94,12.94a172.38,172.38,0,0,1-56.93-42.4l10.69-9.41a157.61,157.61,0,0,0,52.18,38.87Z" transform="translate(-56.84 -56.84)"/></svg>
|
After Width: | Height: | Size: 3.0 KiB |
|
@ -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://kit.svelte.dev/docs/integrations#preprocessors
|
||||
// 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: adapter()
|
||||
}
|
||||
};
|
||||
|
||||
export default config;
|
|
@ -0,0 +1,6 @@
|
|||
import { expect, test } from '@playwright/test';
|
||||
|
||||
test('home page has expected h1', async ({ page }) => {
|
||||
await page.goto('/');
|
||||
await expect(page.locator('h1')).toBeVisible();
|
||||
});
|
|
@ -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://kit.svelte.dev/docs/configuration#alias
|
||||
// except $lib which is handled by https://kit.svelte.dev/docs/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
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
import { sveltekit } from '@sveltejs/kit/vite';
|
||||
import { defineConfig } from 'vitest/config';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [sveltekit()],
|
||||
test: {
|
||||
include: ['src/**/*.{test,spec}.{js,ts}']
|
||||
}
|
||||
});
|
Loading…
Reference in New Issue