From 26b65cbf9c08427adbe480a1e2b4fa0d26bbcc13 Mon Sep 17 00:00:00 2001 From: Papin Nikolai Date: Fri, 2 Aug 2024 20:05:33 +0300 Subject: [PATCH] init sveltekit --- LICENSE | 2 +- frontend/.gitignore | 21 +++++++++++++++++++++ frontend/.npmrc | 1 + frontend/.prettierignore | 4 ++++ frontend/.prettierrc | 8 ++++++++ frontend/README.md | 1 + frontend/eslint.config.js | 23 +++++++++++++++++++++++ frontend/package.json | 27 +++++++++++++++++++++++++++ frontend/src/app.html | 12 ++++++++++++ frontend/src/lib/index.js | 1 + frontend/src/routes/+page.svelte | 2 ++ frontend/static/favicon.png | Bin 0 -> 1571 bytes frontend/svelte.config.js | 13 +++++++++++++ frontend/vite.config.js | 6 ++++++ 14 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 frontend/.gitignore create mode 100644 frontend/.npmrc create mode 100644 frontend/.prettierignore create mode 100644 frontend/.prettierrc create mode 100644 frontend/README.md create mode 100644 frontend/eslint.config.js create mode 100644 frontend/package.json create mode 100644 frontend/src/app.html create mode 100644 frontend/src/lib/index.js create mode 100644 frontend/src/routes/+page.svelte create mode 100644 frontend/static/favicon.png create mode 100644 frontend/svelte.config.js create mode 100644 frontend/vite.config.js diff --git a/LICENSE b/LICENSE index 01c766b..e6203ba 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2024 weirdcat. All rights reserved. +Copyright (c) 2024 Nikolai Papin. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/frontend/.gitignore b/frontend/.gitignore new file mode 100644 index 0000000..79518f7 --- /dev/null +++ b/frontend/.gitignore @@ -0,0 +1,21 @@ +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-* diff --git a/frontend/.npmrc b/frontend/.npmrc new file mode 100644 index 0000000..b6f27f1 --- /dev/null +++ b/frontend/.npmrc @@ -0,0 +1 @@ +engine-strict=true diff --git a/frontend/.prettierignore b/frontend/.prettierignore new file mode 100644 index 0000000..ab78a95 --- /dev/null +++ b/frontend/.prettierignore @@ -0,0 +1,4 @@ +# Package Managers +package-lock.json +pnpm-lock.yaml +yarn.lock diff --git a/frontend/.prettierrc b/frontend/.prettierrc new file mode 100644 index 0000000..9573023 --- /dev/null +++ b/frontend/.prettierrc @@ -0,0 +1,8 @@ +{ + "useTabs": true, + "singleQuote": true, + "trailingComma": "none", + "printWidth": 100, + "plugins": ["prettier-plugin-svelte"], + "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] +} diff --git a/frontend/README.md b/frontend/README.md new file mode 100644 index 0000000..4a042cc --- /dev/null +++ b/frontend/README.md @@ -0,0 +1 @@ +# Personal Website diff --git a/frontend/eslint.config.js b/frontend/eslint.config.js new file mode 100644 index 0000000..2eeebcc --- /dev/null +++ b/frontend/eslint.config.js @@ -0,0 +1,23 @@ +import js from '@eslint/js'; +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, + ...svelte.configs['flat/recommended'], + prettier, + ...svelte.configs['flat/prettier'], + { + languageOptions: { + globals: { + ...globals.browser, + ...globals.node + } + } + }, + { + ignores: ['build/', '.svelte-kit/', 'dist/'] + } +]; diff --git a/frontend/package.json b/frontend/package.json new file mode 100644 index 0000000..edf7e5b --- /dev/null +++ b/frontend/package.json @@ -0,0 +1,27 @@ +{ + "name": "personal-website", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "lint": "prettier --check . && eslint .", + "format": "prettier --write ." + }, + "devDependencies": { + "@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", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/frontend/src/app.html b/frontend/src/app.html new file mode 100644 index 0000000..77a5ff5 --- /dev/null +++ b/frontend/src/app.html @@ -0,0 +1,12 @@ + + + + + + + %sveltekit.head% + + +
%sveltekit.body%
+ + diff --git a/frontend/src/lib/index.js b/frontend/src/lib/index.js new file mode 100644 index 0000000..856f2b6 --- /dev/null +++ b/frontend/src/lib/index.js @@ -0,0 +1 @@ +// place files you want to import through the `$lib` alias in this folder. diff --git a/frontend/src/routes/+page.svelte b/frontend/src/routes/+page.svelte new file mode 100644 index 0000000..5982b0a --- /dev/null +++ b/frontend/src/routes/+page.svelte @@ -0,0 +1,2 @@ +

Welcome to SvelteKit

+

Visit kit.svelte.dev to read the documentation

diff --git a/frontend/static/favicon.png b/frontend/static/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..825b9e65af7c104cfb07089bb28659393b4f2097 GIT binary patch literal 1571 zcmV+;2Hg3HP)Px)-AP12RCwC$UE6KzI1p6{F2N z1VK2vi|pOpn{~#djwYcWXTI_im_u^TJgMZ4JMOsSj!0ma>B?-(Hr@X&W@|R-$}W@Z zgj#$x=!~7LGqHW?IO8+*oE1MyDp!G=L0#^lUx?;!fXv@l^6SvTnf^ac{5OurzC#ZMYc20lI%HhX816AYVs1T3heS1*WaWH z%;x>)-J}YB5#CLzU@GBR6sXYrD>Vw(Fmt#|JP;+}<#6b63Ike{Fuo!?M{yEffez;| zp!PfsuaC)>h>-AdbnwN13g*1LowNjT5?+lFVd#9$!8Z9HA|$*6dQ8EHLu}U|obW6f z2%uGv?vr=KNq7YYa2Roj;|zooo<)lf=&2yxM@e`kM$CmCR#x>gI>I|*Ubr({5Y^rb zghxQU22N}F51}^yfDSt786oMTc!W&V;d?76)9KXX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