Feat: Changes

This commit is contained in:
Bruno
2023-05-16 18:47:13 +02:00
parent 0a24f2eb52
commit e0bf5dc02a
31 changed files with 8035 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
+30
View File
@@ -0,0 +1,30 @@
module.exports = {
root: true,
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:svelte/recommended',
'prettier'
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
extraFileExtensions: ['.svelte']
},
env: {
browser: true,
es2017: true,
node: true
},
overrides: [
{
files: ['*.svelte'],
parser: 'svelte-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser'
}
}
]
};
+10
View File
@@ -0,0 +1,10 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
+2
View File
@@ -0,0 +1,2 @@
engine-strict=true
resolution-mode=highest
+13
View File
@@ -0,0 +1,13 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
+7
View File
@@ -0,0 +1,7 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"svelteSortOrder": "options-scripts-markup-styles"
}
+38
View File
@@ -0,0 +1,38 @@
# create-svelte
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
## Creating a project
If you're seeing this, you've probably already done this step. Congrats!
```bash
# create a new project in the current directory
npm create svelte@latest
# create a new project in my-app
npm create svelte@latest my-app
```
## Developing
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
```bash
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
```
## Building
To create a production version of your app:
```bash
npm run build
```
You can preview the production build with `npm run preview`.
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
+7478
View File
File diff suppressed because it is too large Load Diff
+42
View File
@@ -0,0 +1,42 @@
{
"name": "frontend",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"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 .",
"format": "prettier --plugin-search-dir . --write ."
},
"devDependencies": {
"@playwright/test": "^1.28.1",
"@sveltejs/adapter-auto": "^2.0.0",
"@sveltejs/kit": "^1.5.0",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"autoprefixer": "^10.4.14",
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-svelte": "^2.26.0",
"postcss": "^8.4.23",
"prettier": "^2.8.0",
"prettier-plugin-svelte": "^2.8.1",
"svelte": "^3.54.0",
"svelte-check": "^3.0.1",
"tailwindcss": "^3.3.2",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^4.3.0",
"vitest": "^0.25.3"
},
"type": "module",
"dependencies": {
"cssnano": "^6.0.1",
"postcss-nesting": "^11.2.2"
}
}
+12
View File
@@ -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;
+21
View File
@@ -0,0 +1,21 @@
const tailwindcss = require('tailwindcss');
const autoprefixer = require('autoprefixer');
const postcssImport = require('postcss-import');
const postcssNesting = require('postcss-nesting');
const cssnano = require('cssnano');
const mode = process.env.NODE_ENV;
const dev = mode === 'development';
module.exports = {
plugins: [
postcssImport(),
postcssNesting(),
tailwindcss(),
autoprefixer(),
!dev &&
cssnano({
preset: 'default'
})
]
};
+12
View File
@@ -0,0 +1,12 @@
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
declare global {
namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface Platform {}
}
}
export {};
+12
View File
@@ -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" />
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>
+7
View 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);
});
});
+15
View File
@@ -0,0 +1,15 @@
<script lang="ts">
import '$styles/tailwind.css';
const pages = [
{ name: 'Home', icon: 'home', path: '/attendee' },
{ name: 'Chat', icon: 'chat', path: '/attendee/chat' },
{ name: 'Networking', icon: 'social', path: '/attendee/networking' },
{ name: 'Calendar', icon: 'calendar', path: '/attendee/calendar' }
] as const;
</script>
<div class="bg-[#0B2A37] h-screen w-screen">
<div />
<slot />
</div>
View File
+24
View File
@@ -0,0 +1,24 @@
/* Injects Tailwind's base styles & any base styles registered by plugins. */
@tailwind base;
@layer base {
/* custom CSS goes here */
}
/* Injects Tailwind's component classes & any component classes registered by plugins. */
@tailwind components;
@layer components {
/* custom CSS goes here */
}
/* Injects Tailwind's utility classes & any utility classes registered by plugins. */
@tailwind utilities;
@layer utilities {
/* custom CSS goes here */
}
/* Directive controlling where Tailwind injects responsive variations of utilities.
By default Tailwind normally append these at the end of your stylesheet. */
@tailwind screens;
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

+18
View File
@@ -0,0 +1,18 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 340 224">
<rect width="340" height="224" x="0" y="0" fill="#0b2a37" rx="0" ry="0"></rect>
<g id="content" transform="translate(-14.675779999999975,32)">
<path id="circle0" fill="#ffffff" d="M162.68928 79.500341c.00001 32.335449 19.43462 62.028599 49.38074 74.430609 29.87414 12.37423 64.31674 5.52319 87.17895-17.34172 22.86505-22.86506 29.71595-57.306944 17.34172-87.178952C304.18797 19.467723 274.53544.016 242.20284.016v14.377329c26.562 0 50.97695 16.042665 61.11362 40.514624 10.16518 24.540368 4.55826 52.727797-14.22412 71.508967-18.78259 18.7826-46.97003 24.3893-71.50897 14.22412-24.46839-10.13524-40.51462-34.5787-40.51462-61.141412z" paint-order="markers fill stroke" style="font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-decoration-line:none;text-decoration-style:solid;text-transform:none;text-orientation:mixed;white-space:normal;shape-padding:0;isolation:auto;mix-blend-mode:normal"></path>
<path id="circle4" fill="#ffffff" d="M215.271 79.543096c-.00001 10.890599 6.57041 20.717294 16.63198 24.885264 10.06114 4.16762 21.66576 1.86914 29.36678-5.831597 7.70102-7.701021 9.99914-19.304928 5.8316-29.366778-4.16762-10.061138-13.99467-16.631982-24.88527-16.631982v4.843441c8.94593 0 16.99398 5.374539 20.41729 13.639793 3.42331 8.265254 1.538 17.766434-4.78779 24.092145-6.32578 6.325788-15.82675 8.211238-24.09214 4.787788-8.26469-3.423452-13.63979-11.471364-13.63979-20.41729z" paint-order="markers fill stroke" style="font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-decoration-line:none;text-decoration-style:solid;text-transform:none;text-orientation:mixed;white-space:normal;shape-padding:0;isolation:auto;mix-blend-mode:normal"></path>
<text x="234.51401" y="68.234459" fill="#ffffff" stroke-width="1.9459722" font-family="sans-serif" font-size="77.83888245" font-weight="400" letter-spacing="0" style="line-height:1.25;text-align:end" text-anchor="end" word-spacing="0">
<tspan id="title" x="234.51402" y="68.234459" font-family="Fira Code" font-weight="700" style="-inkscape-font-specification:'Fira Code Bold';text-align:end">PWC²</tspan>
</text>
<text x="159.64459" y="120.83648" fill="#ffffff" stroke-width="1.17030752" font-family="sans-serif" font-size="46.81230164" font-weight="400" letter-spacing="0" style="line-height:1.25;text-align:end" text-anchor="end" word-spacing="0">
<tspan id="subtitle" x="159.64459" y="120.83648" font-family="Fira Code" font-weight="700" style="-inkscape-font-specification:'Fira Code Bold';text-align:end">Pátek</tspan>
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

+18
View File
@@ -0,0 +1,18 @@
import preprocess from 'svelte-preprocess';
import adapter from '@sveltejs/adapter-auto';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
preprocess: preprocess({
postcss: true
}),
kit: {
// hydrate the <div id="svelte"> element in src/app.html
adapter: adapter()
}
};
export default config;
+12
View File
@@ -0,0 +1,12 @@
module.exports = {
mode: 'jit',
content: ['./src/**/*.{html,js,svelte,ts}'],
theme: {
extend: {
},
},
variants: {
extend: {}
},
plugins: []
};
+6
View 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();
});
+46
View File
@@ -0,0 +1,46 @@
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"moduleResolution": "node",
"module": "es2020",
"lib": ["es2020", "DOM"],
"target": "es2020",
/**
svelte-preprocess cannot figure out whether you have a value or a type, so tell TypeScript
to enforce using \`import type\` instead of \`import\` for Types.
*/
"importsNotUsedAsValues": "error",
"isolatedModules": true,
"resolveJsonModule": true,
/**
To have warnings/errors of the Svelte compiler at the correct position,
enable source maps by default.
*/
"sourceMap": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"baseUrl": ".",
"allowJs": true,
"checkJs": true,
"paths": {
"$lib": ["src/lib"],
"$lib/*": ["src/lib/*"],
"$styles": ["src/styles"],
"$styles/*": ["src/styles/*"],
"$stores": ["src/stores"],
"$stores/*": ["src/stores/*"],
"$utils": ["src/utils"],
"$utils/*": ["src/utils/*"],
"$components": ["src/lib/components"],
"$components/*": ["src/lib/components/*"],
"$pages": ["src/lib/pages"],
"$pages/*": ["src/lib/pages/*"],
"$sections": ["src/lib/sections"],
"$sections/*": ["src/lib/sections/*"],
"$icons": ["src/lib/icons"],
"$icons/*": ["src/lib/icons/*"]
}
},
"include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.ts", "src/**/*.svelte"]
}
+21
View File
@@ -0,0 +1,21 @@
import { sveltekit } from '@sveltejs/kit/vite';
import path from 'path';
/** @type {import('vite').UserConfig} */
const config = {
plugins: [sveltekit()],
resolve: {
alias: {
$stores: path.resolve('./src/stores'),
$styles: path.resolve('./src/styles'),
$utils: path.resolve('./src/utils'),
$components: path.resolve('./src/lib/components'),
$pages: path.resolve('./src/lib/pages'),
$sections: path.resolve('./src/lib/sections'),
$icons: path.resolve('./src/lib/icons')
}
},
clearScreen: false
};
export default config;