Compare commits
No commits in common. "a89efa0ddb6c8f2421a0827cbfd3755d9115d935" and "13ca1d1432e64540b4406d6ed35e653e2219c880" have entirely different histories.
a89efa0ddb
...
13ca1d1432
@ -1,10 +1,16 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
extends: ['eslint:recommended', 'plugin:svelte/recommended', 'prettier'],
|
parser: '@typescript-eslint/parser',
|
||||||
|
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
|
||||||
|
plugins: ['svelte3', '@typescript-eslint'],
|
||||||
|
ignorePatterns: ['*.cjs'],
|
||||||
|
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
|
||||||
|
settings: {
|
||||||
|
'svelte3/typescript': () => require('typescript')
|
||||||
|
},
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
sourceType: 'module',
|
sourceType: 'module',
|
||||||
ecmaVersion: 2020,
|
ecmaVersion: 2020
|
||||||
extraFileExtensions: ['.svelte']
|
|
||||||
},
|
},
|
||||||
env: {
|
env: {
|
||||||
browser: true,
|
browser: true,
|
||||||
|
44
.vscode/settings.json
vendored
44
.vscode/settings.json
vendored
@ -1,74 +1,44 @@
|
|||||||
{
|
{
|
||||||
"prettier.documentSelectors": [
|
|
||||||
"**/*.svelte"
|
|
||||||
],
|
|
||||||
"tailwindCSS.classAttributes": [
|
"tailwindCSS.classAttributes": [
|
||||||
"class",
|
"class",
|
||||||
"accent",
|
"accent",
|
||||||
"active",
|
"active",
|
||||||
"aspectRatio",
|
|
||||||
"background",
|
"background",
|
||||||
"badge",
|
"badge",
|
||||||
"bgBackdrop",
|
|
||||||
"bgDark",
|
|
||||||
"bgDrawer",
|
|
||||||
"bgLight",
|
|
||||||
"blur",
|
|
||||||
"border",
|
"border",
|
||||||
|
"borderColor",
|
||||||
|
"borderWidth",
|
||||||
"button",
|
"button",
|
||||||
"buttonAction",
|
|
||||||
"buttonBack",
|
"buttonBack",
|
||||||
"buttonClasses",
|
"buttonClasses",
|
||||||
"buttonComplete",
|
"buttonComplete",
|
||||||
"buttonDismiss",
|
|
||||||
"buttonNeutral",
|
|
||||||
"buttonNext",
|
"buttonNext",
|
||||||
"buttonPositive",
|
|
||||||
"buttonTextCancel",
|
|
||||||
"buttonTextConfirm",
|
|
||||||
"buttonTextFirst",
|
|
||||||
"buttonTextLast",
|
|
||||||
"buttonTextNext",
|
"buttonTextNext",
|
||||||
"buttonTextPrevious",
|
"buttonTextPrevious",
|
||||||
"buttonTextSubmit",
|
|
||||||
"caretClosed",
|
|
||||||
"caretOpen",
|
|
||||||
"chips",
|
"chips",
|
||||||
"color",
|
"color",
|
||||||
"controlSeparator",
|
|
||||||
"controlVariant",
|
|
||||||
"cursor",
|
"cursor",
|
||||||
"display",
|
"display",
|
||||||
"element",
|
"element",
|
||||||
"fill",
|
"fill",
|
||||||
"fillDark",
|
|
||||||
"fillLight",
|
|
||||||
"flex",
|
"flex",
|
||||||
"gap",
|
"gap",
|
||||||
"gridColumns",
|
"gridColumns",
|
||||||
"height",
|
"height",
|
||||||
"hover",
|
"hover",
|
||||||
"indent",
|
"invalid",
|
||||||
"justify",
|
"justify",
|
||||||
"meter",
|
"meter",
|
||||||
"padding",
|
"padding",
|
||||||
"position",
|
|
||||||
"regionBackdrop",
|
|
||||||
"regionBody",
|
"regionBody",
|
||||||
"regionCaption",
|
"regionCaption",
|
||||||
"regionCaret",
|
"regionCaret",
|
||||||
"regionCell",
|
|
||||||
"regionChildren",
|
|
||||||
"regionCone",
|
"regionCone",
|
||||||
"regionContent",
|
"regionContent",
|
||||||
"regionControl",
|
"regionControl",
|
||||||
"regionDefault",
|
"regionDefault",
|
||||||
"regionDrawer",
|
|
||||||
"regionFoot",
|
"regionFoot",
|
||||||
"regionFootCell",
|
|
||||||
"regionFooter",
|
|
||||||
"regionHead",
|
"regionHead",
|
||||||
"regionHeadCell",
|
|
||||||
"regionHeader",
|
"regionHeader",
|
||||||
"regionIcon",
|
"regionIcon",
|
||||||
"regionInterface",
|
"regionInterface",
|
||||||
@ -82,11 +52,7 @@
|
|||||||
"regionPanel",
|
"regionPanel",
|
||||||
"regionRowHeadline",
|
"regionRowHeadline",
|
||||||
"regionRowMain",
|
"regionRowMain",
|
||||||
"regionSummary",
|
|
||||||
"regionSymbol",
|
|
||||||
"regionTab",
|
|
||||||
"regionTrail",
|
"regionTrail",
|
||||||
"ring",
|
|
||||||
"rounded",
|
"rounded",
|
||||||
"select",
|
"select",
|
||||||
"shadow",
|
"shadow",
|
||||||
@ -102,10 +68,10 @@
|
|||||||
"slotSidebarLeft",
|
"slotSidebarLeft",
|
||||||
"slotSidebarRight",
|
"slotSidebarRight",
|
||||||
"slotTrail",
|
"slotTrail",
|
||||||
|
"space",
|
||||||
"spacing",
|
"spacing",
|
||||||
"text",
|
"text",
|
||||||
"track",
|
"track",
|
||||||
"width",
|
"width"
|
||||||
"zIndex"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
1256
package-lock.json
generated
1256
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
38
package.json
38
package.json
@ -1,33 +1,45 @@
|
|||||||
{
|
{
|
||||||
"name": "my-skeleton-app",
|
"name": "blackbirdchess-client-web",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite dev",
|
"dev": "vite dev",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
|
"test": "playwright test",
|
||||||
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||||
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
||||||
|
"test:unit": "vitest",
|
||||||
"lint": "prettier --plugin-search-dir . --check . && eslint .",
|
"lint": "prettier --plugin-search-dir . --check . && eslint .",
|
||||||
"format": "prettier --plugin-search-dir . --write ."
|
"format": "prettier --plugin-search-dir . --write ."
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@floating-ui/dom": "^1.5.1",
|
"@playwright/test": "^1.28.1",
|
||||||
"@skeletonlabs/skeleton": "^1.12.0",
|
"@skeletonlabs/skeleton": "^1.0.0",
|
||||||
"@sveltejs/adapter-auto": "^2.0.0",
|
"@sveltejs/adapter-auto": "^2.0.0",
|
||||||
"@sveltejs/kit": "^1.5.0",
|
"@sveltejs/kit": "^1.5.0",
|
||||||
"@tailwindcss/forms": "^0.5.4",
|
"@tailwindcss/forms": "^0.5.3",
|
||||||
"@tailwindcss/typography": "^0.5.9",
|
"@typescript-eslint/eslint-plugin": "^5.45.0",
|
||||||
"autoprefixer": "^10.4.15",
|
"@typescript-eslint/parser": "^5.45.0",
|
||||||
"axios": "^1.4.0",
|
"autoprefixer": "^10.4.7",
|
||||||
"eslint": "^8.28.0",
|
"eslint": "^8.28.0",
|
||||||
"eslint-config-prettier": "^8.5.0",
|
"eslint-config-prettier": "^8.5.0",
|
||||||
"eslint-plugin-svelte": "^2.26.0",
|
"eslint-plugin-svelte3": "^4.0.0",
|
||||||
"postcss": "^8.4.28",
|
"postcss": "^8.4.14",
|
||||||
|
"postcss-load-config": "^4.0.1",
|
||||||
"prettier": "^2.8.0",
|
"prettier": "^2.8.0",
|
||||||
"prettier-plugin-svelte": "^2.8.1",
|
"prettier-plugin-svelte": "^2.8.1",
|
||||||
"sass": "^1.65.1",
|
|
||||||
"svelte": "^3.54.0",
|
"svelte": "^3.54.0",
|
||||||
"tailwindcss": "^3.3.3",
|
"svelte-check": "^3.0.1",
|
||||||
"vite": "^4.3.0"
|
"svelte-preprocess": "^4.10.7",
|
||||||
|
"tailwindcss": "^3.1.5",
|
||||||
|
"tslib": "^2.4.1",
|
||||||
|
"typescript": "^4.9.3",
|
||||||
|
"vite": "^4.0.0",
|
||||||
|
"vitest": "^0.25.3"
|
||||||
},
|
},
|
||||||
"type": "module"
|
"type": "module",
|
||||||
|
"dependencies": {
|
||||||
|
"axios": "^1.3.4"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
11
playwright.config.ts
Normal file
11
playwright.config.ts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import type { PlaywrightTestConfig } from '@playwright/test';
|
||||||
|
|
||||||
|
const config: PlaywrightTestConfig = {
|
||||||
|
webServer: {
|
||||||
|
command: 'npm run build && npm run preview',
|
||||||
|
port: 4173
|
||||||
|
},
|
||||||
|
testDir: 'tests'
|
||||||
|
};
|
||||||
|
|
||||||
|
export default config;
|
@ -1,6 +1,6 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
plugins: {
|
plugins: {
|
||||||
tailwindcss: {},
|
tailwindcss: {},
|
||||||
autoprefixer: {},
|
autoprefixer: {}
|
||||||
},
|
}
|
||||||
}
|
};
|
||||||
|
1
src/app.d.ts
vendored
1
src/app.d.ts
vendored
@ -7,3 +7,4 @@ declare namespace App {
|
|||||||
// interface Error {}
|
// interface Error {}
|
||||||
// interface Platform {}
|
// interface Platform {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
20
src/app.html
20
src/app.html
@ -1,12 +1,12 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" class="dark">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
|
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
|
||||||
<meta name="viewport" content="width=device-width" />
|
<meta name="viewport" content="width=device-width" />
|
||||||
%sveltekit.head%
|
%sveltekit.head%
|
||||||
</head>
|
</head>
|
||||||
<body data-sveltekit-preload-data="hover" data-theme="skeleton">
|
<body data-sveltekit-preload-data="hover" data-theme="skeleton">
|
||||||
<div style="display: contents">%sveltekit.body%</div>
|
<div style="display: contents">%sveltekit.body%</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
/*place global styles here */
|
/*Write your global styles here, in PostCSS syntax */
|
||||||
@import "/static/scss/icons.scss";
|
@import "/static/scss/icons.scss";
|
||||||
|
@tailwind base;
|
||||||
|
/*place global styles here */
|
||||||
html,
|
html,
|
||||||
body {
|
body {
|
||||||
@apply h-full;
|
@apply h-full overflow-hidden;
|
||||||
}
|
}
|
||||||
|
@tailwind components;
|
||||||
|
@tailwind utilities;
|
7
src/index.test.ts
Normal file
7
src/index.test.ts
Normal file
@ -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);
|
||||||
|
});
|
||||||
|
});
|
@ -1,13 +1,12 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
// The ordering of these imports is critical to your app working properly
|
// The ordering of these imports is critical to your app working properly
|
||||||
import '@skeletonlabs/skeleton/themes/theme-skeleton.css';
|
import '@skeletonlabs/skeleton/themes/theme-skeleton.css';
|
||||||
// If you have source.organizeImports set to true in VSCode, then it will auto change this ordering
|
// If you have source.organizeImports set to true in VSCode, then it will auto change this ordering
|
||||||
import '@skeletonlabs/skeleton/styles/all.css';
|
import '@skeletonlabs/skeleton/styles/all.css';
|
||||||
// Most of your app wide CSS should be put in this file
|
// Most of your app wide CSS should be put in this file
|
||||||
import '../app.postcss';
|
import '../app.postcss';
|
||||||
|
|
||||||
import {alerts, globals} from "$lib/stores.js";
|
import {alerts, globals} from "$lib/stores.js";
|
||||||
import { autoModeWatcher } from '@skeletonlabs/skeleton';
|
|
||||||
|
|
||||||
let alertsvar;
|
let alertsvar;
|
||||||
let globalvars;
|
let globalvars;
|
||||||
@ -26,7 +25,7 @@
|
|||||||
globalvars = value;
|
globalvars = value;
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<svelte:head>{@html `<script>${autoModeWatcher.toString()} autoModeWatcher();</script>`}</svelte:head>
|
|
||||||
{#if typeof globalvars.user !== 'undefined' }
|
{#if typeof globalvars.user !== 'undefined' }
|
||||||
{#each alertsvar as alert, i}
|
{#each alertsvar as alert, i}
|
||||||
<aside class="alert variant-filled-{alert.class}">
|
<aside class="alert variant-filled-{alert.class}">
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
import { createEventDispatcher } from 'svelte';
|
import { createEventDispatcher } from 'svelte';
|
||||||
import {browser} from "$app/environment";
|
import {browser} from "$app/environment";
|
||||||
import {requestor} from "../../../serverrequest.js";
|
import {requestor} from "../../../serverrequest.js";
|
||||||
|
import {throwError} from "svelte-preprocess/dist/modules/errors.js";
|
||||||
import {goto} from "$app/navigation";
|
import {goto} from "$app/navigation";
|
||||||
|
|
||||||
var email = '';
|
var email = '';
|
||||||
@ -52,7 +53,7 @@
|
|||||||
if(response.status != 200) {
|
if(response.status != 200) {
|
||||||
let message = 'Something went wrong during login'
|
let message = 'Something went wrong during login'
|
||||||
if(typeof responsedata.message !== 'undefined') message = responsedata.message
|
if(typeof responsedata.message !== 'undefined') message = responsedata.message
|
||||||
throw(message)
|
throwError(message)
|
||||||
}
|
}
|
||||||
if(!responsedata.success) return alerts.update(data => [...data, {text: 'Login failed: ' + responsedata.message , class: 'error'}]);
|
if(!responsedata.success) return alerts.update(data => [...data, {text: 'Login failed: ' + responsedata.message , class: 'error'}]);
|
||||||
globals.update((globalobj) => ({ ...globalobj, ...{user: responsedata.user }}));
|
globals.update((globalobj) => ({ ...globalobj, ...{user: responsedata.user }}));
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 4.9 KiB |
@ -1,11 +1,18 @@
|
|||||||
|
import preprocess from 'svelte-preprocess';
|
||||||
import adapter from '@sveltejs/adapter-auto';
|
import adapter from '@sveltejs/adapter-auto';
|
||||||
import { vitePreprocess } from '@sveltejs/kit/vite';
|
import { vitePreprocess } from '@sveltejs/kit/vite';
|
||||||
|
|
||||||
/** @type {import('@sveltejs/kit').Config} */
|
/** @type {import('@sveltejs/kit').Config} */
|
||||||
const config = {
|
const config = {
|
||||||
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
|
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
|
||||||
// for more information about preprocessors
|
// for more information about preprocessors
|
||||||
preprocess: vitePreprocess(),
|
preprocess: [
|
||||||
|
vitePreprocess(),
|
||||||
|
preprocess({
|
||||||
|
postcss: true
|
||||||
|
})
|
||||||
|
],
|
||||||
|
|
||||||
kit: {
|
kit: {
|
||||||
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
|
// 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.
|
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
|
||||||
@ -13,4 +20,5 @@ const config = {
|
|||||||
adapter: adapter()
|
adapter: adapter()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
export default config;
|
|
||||||
|
export default config;
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
import { join } from 'path'
|
|
||||||
import forms from '@tailwindcss/forms'
|
|
||||||
import typography from '@tailwindcss/typography'
|
|
||||||
import skeleton from '@skeletonlabs/skeleton/tailwind/skeleton.cjs'
|
|
||||||
|
|
||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
module.exports = {
|
module.exports = {
|
||||||
darkMode: 'class',
|
darkMode: 'class',
|
||||||
content: ['./src/**/*.{html,js,svelte,ts}', join(require.resolve('@skeletonlabs/skeleton'), '../**/*.{html,js,svelte,ts}')],
|
content: [
|
||||||
|
'./src/**/*.{html,js,svelte,ts}',
|
||||||
|
require('path').join(require.resolve('@skeletonlabs/skeleton'), '../**/*.{html,js,svelte,ts}')
|
||||||
|
],
|
||||||
theme: {
|
theme: {
|
||||||
extend: {},
|
extend: {}
|
||||||
},
|
},
|
||||||
plugins: [forms,typography,...skeleton()],
|
plugins: [
|
||||||
}
|
...require('@skeletonlabs/skeleton/tailwind/skeleton.cjs')(),
|
||||||
|
require('@tailwindcss/forms')
|
||||||
|
]
|
||||||
|
};
|
||||||
|
6
tests/test.ts
Normal file
6
tests/test.ts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import { expect, test } from '@playwright/test';
|
||||||
|
|
||||||
|
test('index page has expected h1', async ({ page }) => {
|
||||||
|
await page.goto('/');
|
||||||
|
await expect(page.getByRole('heading', { name: 'Welcome to SvelteKit' })).toBeVisible();
|
||||||
|
});
|
17
tsconfig.json
Normal file
17
tsconfig.json
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"extends": "./.svelte-kit/tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"allowJs": true,
|
||||||
|
"checkJs": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"strict": true
|
||||||
|
}
|
||||||
|
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
|
||||||
|
//
|
||||||
|
// 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
|
||||||
|
}
|
@ -1,6 +0,0 @@
|
|||||||
import { sveltekit } from '@sveltejs/kit/vite';
|
|
||||||
import { defineConfig } from 'vite';
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
plugins: [sveltekit()]
|
|
||||||
});
|
|
12
vite.config.ts
Normal file
12
vite.config.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import { sveltekit } from '@sveltejs/kit/vite';
|
||||||
|
import { defineConfig } from 'vitest/config';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
plugins: [sveltekit()],
|
||||||
|
test: {
|
||||||
|
include: ['src/**/*.{test,spec}.{js,ts}']
|
||||||
|
},
|
||||||
|
server: {
|
||||||
|
port: 5174
|
||||||
|
}
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user