Skip to content

Commit

Permalink
feat: ui add
Browse files Browse the repository at this point in the history
Signed-off-by: Eray Ates <[email protected]>
  • Loading branch information
rytsh committed Oct 8, 2024
1 parent 5df6d6b commit 430f8e1
Show file tree
Hide file tree
Showing 31 changed files with 4,886 additions and 180 deletions.
1 change: 1 addition & 0 deletions handler/_ui/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
44 changes: 44 additions & 0 deletions handler/_ui/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
module.exports = {
"env": {
"browser": true,
"jest": true,
"node": true,
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"tsconfigRootDir": __dirname,
"project": ["./tsconfig.json"],
"extraFileExtensions": [".svelte", ".html"],
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"google",
],
"plugins": ["html", "svelte3", "@typescript-eslint"],
"overrides": [
{
"files": ["*.svelte"],
"processor": "svelte3/svelte3",
},
],
"settings": {
"html/html-extensions": [".html"],
"svelte3/typescript": require("typescript"),
"svelte3/ignore-styles": () => true,
},
"rules": {
"indent": ["error", 2, { "SwitchCase": 1 }],
"new-cap": "off",
"@typescript-eslint/no-explicit-any": "off",
"object-curly-spacing": ["error", "always"],
"linebreak-style": ["error", "unix"],
"semi": ["error", "always"],
"quotes": ["error", "double"],
"jsx-quotes": "warn",
"quote-props": ["error", "consistent"],
"require-jsdoc": "off",
"max-len": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
},
};
4 changes: 4 additions & 0 deletions handler/_ui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/node_modules/
/dist/
.DS_Store
.svelte-kit/
1 change: 1 addition & 0 deletions handler/_ui/.stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/index.html
15 changes: 15 additions & 0 deletions handler/_ui/.stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"plugins": [
"stylelint-scss"
],
"extends": [
"stylelint-config-standard",
"stylelint-config-sass-guidelines"
],
"rules": {
"at-rule-no-unknown": null,
"scss/at-rule-no-unknown": null,
"selector-max-id": 2,
"max-nesting-depth": 3
}
}
7 changes: 7 additions & 0 deletions handler/_ui/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"svelte.svelte-vscode",
"dbaeumer.vscode-eslint",
"stylelint.vscode-stylelint"
]
}
35 changes: 35 additions & 0 deletions handler/_ui/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"prettier.enable": false,
"editor.tabSize": 2,
"editor.formatOnSave": true,
"editor.detectIndentation": false,
"eslint.enable": true,
"eslint.alwaysShowStatus": true,
"eslint.format.enable": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.fixAll.stylelint": "explicit"
},
"stylelint.packageManager": "pnpm",
"stylelint.validate": [
"css",
"scss",
"less",
"postcss",
"html",
],
"eslint.validate": [
"html",
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"svelte"
],
"svelte.enable-ts-plugin": true,
"[svelte]": {
"editor.defaultFormatter": "svelte.svelte-vscode"
},
"files.insertFinalNewline": true,
"scss.lint.unknownAtRules": "ignore",
}
36 changes: 36 additions & 0 deletions handler/_ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Web Template

Vite + Svelte template with good stuffs.

> __-__ SCSS, Tailwind
> __-__ pnpm repo
> __-__ eslint + stylelint
> __-__ prettier disabled!
> __-__ .vscode config and recommended list
> __-__ gh-pages
> __-__ proxy settings
## Usage

Get this repo with `degit`.

```sh
degit https://github.com/rytsh/vitesse.git my-new-project
```

```sh
cd my-new-project
pnpm install
```

Run project

```sh
pnpm run dev
```

Build

```sh
pnpm build
```
16 changes: 16 additions & 0 deletions handler/_ui/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="icon" type="image/svg+xml" href="./logo.svg" />
<script type="module" src="./src/main.ts" defer></script>

<title>Vitesse</title>
</head>

<body>
</body>

</html>
45 changes: 45 additions & 0 deletions handler/_ui/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "_~vitesse-template~_",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "vite",
"build": "vite build",
"serve": "vite preview",
"check": "svelte-check --tsconfig ./tsconfig.json",
"pages": "gh-pages -d dist -t"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^3.1.2",
"@tsconfig/svelte": "^5.0.4",
"@typescript-eslint/eslint-plugin": "^8.2.0",
"@typescript-eslint/parser": "^8.2.0",
"autoprefixer": "^10.4.20",
"axios": "^1.7.4",
"eslint": "^9.9.0",
"eslint-config-google": "^0.14.0",
"eslint-plugin-html": "^8.1.1",
"eslint-plugin-svelte": "^2.43.0",
"gh-pages": "^6.1.1",
"postcss": "^8.4.41",
"postcss-load-config": "^5.1.0",
"rollup": "^4.21.0",
"sass": "^1.77.8",
"stylelint": "^16.8.2",
"stylelint-config-sass-guidelines": "^12.0.0",
"stylelint-config-standard": "^36.0.1",
"stylelint-scss": "6.5.0",
"svelte": "^4.2.18",
"svelte-check": "^3.8.5",
"svelte-preprocess": "^6.0.2",
"tailwindcss": "^3.4.10",
"tslib": "^2.6.3",
"typescript": "^5.5.4",
"vite": "^5.4.2",
"vite-plugin-html": "^3.2.2"
},
"dependencies": {
"immutability-helper": "^3.1.1",
"svelte-spa-router": "^4.0.1"
}
}
Loading

0 comments on commit 430f8e1

Please sign in to comment.