From 1e9726a601da067588b5b2b273382b9ffcfe9b49 Mon Sep 17 00:00:00 2001 From: dragongoose <19649813+dragongoose@users.noreply.github.com> Date: Fri, 24 Mar 2023 07:55:10 -0400 Subject: [PATCH] Move folder --- frontend/.eslintrc.cjs => .eslintrc.cjs | 0 frontend/.gitignore => .gitignore | 0 frontend/.prettierrc.json => .prettierrc.json | 0 README.md | 71 +++++++++++------- frontend/env.d.ts => env.d.ts | 0 frontend/README.md | 46 ------------ frontend/package.json | 46 ------------ frontend/index.html => index.html | 0 .../package-lock.json => package-lock.json | 0 package.json | 44 ++++++++++- .../postcss.config.js => postcss.config.js | 0 {frontend/public => public}/favicon.ico | Bin {frontend/src => src}/App.vue | 0 {frontend/src => src}/assets/index.css | 0 .../src => src}/assets/qualitySelector.ts | 0 .../src => src}/components/NavbarView.vue | 0 .../src => src}/components/TwitchChat.vue | 0 .../src => src}/components/VideoPlayer.vue | 0 {frontend/src => src}/main.ts | 0 {frontend/src => src}/router/index.ts | 0 {frontend/src => src}/views/CategoryView.vue | 0 {frontend/src => src}/views/HomepageView.vue | 0 {frontend/src => src}/views/PageNotFound.vue | 0 .../src => src}/views/PrivacyPageView.vue | 0 {frontend/src => src}/views/UserView.vue | 0 .../tailwind.config.js => tailwind.config.js | 0 frontend/tsconfig.json => tsconfig.json | 0 .../tsconfig.node.json => tsconfig.node.json | 0 frontend/vite.config.ts => vite.config.ts | 0 29 files changed, 86 insertions(+), 121 deletions(-) rename frontend/.eslintrc.cjs => .eslintrc.cjs (100%) rename frontend/.gitignore => .gitignore (100%) rename frontend/.prettierrc.json => .prettierrc.json (100%) rename frontend/env.d.ts => env.d.ts (100%) delete mode 100644 frontend/README.md delete mode 100644 frontend/package.json rename frontend/index.html => index.html (100%) rename frontend/package-lock.json => package-lock.json (100%) rename frontend/postcss.config.js => postcss.config.js (100%) rename {frontend/public => public}/favicon.ico (100%) rename {frontend/src => src}/App.vue (100%) rename {frontend/src => src}/assets/index.css (100%) rename {frontend/src => src}/assets/qualitySelector.ts (100%) rename {frontend/src => src}/components/NavbarView.vue (100%) rename {frontend/src => src}/components/TwitchChat.vue (100%) rename {frontend/src => src}/components/VideoPlayer.vue (100%) rename {frontend/src => src}/main.ts (100%) rename {frontend/src => src}/router/index.ts (100%) rename {frontend/src => src}/views/CategoryView.vue (100%) rename {frontend/src => src}/views/HomepageView.vue (100%) rename {frontend/src => src}/views/PageNotFound.vue (100%) rename {frontend/src => src}/views/PrivacyPageView.vue (100%) rename {frontend/src => src}/views/UserView.vue (100%) rename frontend/tailwind.config.js => tailwind.config.js (100%) rename frontend/tsconfig.json => tsconfig.json (100%) rename frontend/tsconfig.node.json => tsconfig.node.json (100%) rename frontend/vite.config.ts => vite.config.ts (100%) diff --git a/frontend/.eslintrc.cjs b/.eslintrc.cjs similarity index 100% rename from frontend/.eslintrc.cjs rename to .eslintrc.cjs diff --git a/frontend/.gitignore b/.gitignore similarity index 100% rename from frontend/.gitignore rename to .gitignore diff --git a/frontend/.prettierrc.json b/.prettierrc.json similarity index 100% rename from frontend/.prettierrc.json rename to .prettierrc.json diff --git a/README.md b/README.md index e4b9622..c0bde3e 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,46 @@ -# twitch-frontend -twitch-frontend is a privacy respecting frontend for [twitch.tv](https://twitch.tv/) +# test -The main advantages of twitch-frontend are: - - Private: Every request is proxied through the server, and no logs are kept. - - Lightweight: Compared to twitch, twitch-frontend is optimized for speed and usability. Scraping is the only current speed issue, but improves with caching - -
- - # Features - - ### User features - - [x] No connection to twitch/amazon - - [x] No Ads or tracking - - [x] No outside connections, only connection is the instance - - [x] Uses [Vue](https://vuejs.org/) for a speedy experience - - [x] No identifiable logs are kept (see [logs](#so-what-is-logged)) - - [x] Much smaller pages compared to Twitch (<600kb compared to >8.2mb) - - ### Technical features - - [x] Public API - - [x] No official APIs are used - - [x] Uses a custom Twitch webscraper +This template should help get you started developing with Vue 3 in Vite. - - - ## So, what is logged? - You may have caught the "No identifiable logs are kept", - When the server encounters an error, a log is kept. The log only includes the error message, the time, and an id, which is also given to the user so the instance owner can investigate the issue. This is mainly only used for debugging, and can be disabled in the config. +## Recommended IDE Setup + +[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin). + +## Type Support for `.vue` Imports in TS + +TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types. + +If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps: + +1. Disable the built-in TypeScript Extension + 1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette + 2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)` +2. Reload the VSCode window by running `Developer: Reload Window` from the command palette. + +## Customize configuration + +See [Vite Configuration Reference](https://vitejs.dev/config/). + +## Project Setup + +```sh +npm install +``` + +### Compile and Hot-Reload for Development + +```sh +npm run dev +``` + +### Type-Check, Compile and Minify for Production + +```sh +npm run build +``` + +### Lint with [ESLint](https://eslint.org/) + +```sh +npm run lint +``` diff --git a/frontend/env.d.ts b/env.d.ts similarity index 100% rename from frontend/env.d.ts rename to env.d.ts diff --git a/frontend/README.md b/frontend/README.md deleted file mode 100644 index c0bde3e..0000000 --- a/frontend/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# test - -This template should help get you started developing with Vue 3 in Vite. - -## Recommended IDE Setup - -[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin). - -## Type Support for `.vue` Imports in TS - -TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types. - -If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps: - -1. Disable the built-in TypeScript Extension - 1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette - 2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)` -2. Reload the VSCode window by running `Developer: Reload Window` from the command palette. - -## Customize configuration - -See [Vite Configuration Reference](https://vitejs.dev/config/). - -## Project Setup - -```sh -npm install -``` - -### Compile and Hot-Reload for Development - -```sh -npm run dev -``` - -### Type-Check, Compile and Minify for Production - -```sh -npm run build -``` - -### Lint with [ESLint](https://eslint.org/) - -```sh -npm run lint -``` diff --git a/frontend/package.json b/frontend/package.json deleted file mode 100644 index 9d61b64..0000000 --- a/frontend/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "test", - "version": "0.0.0", - "private": true, - "scripts": { - "dev": "vite", - "build": "run-p type-check build-only", - "preview": "vite preview", - "build-only": "vite build", - "type-check": "vue-tsc --noEmit", - "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", - "format": "prettier --write src/" - }, - "dependencies": { - "@dragongoose/streamlink": "^1.0.2", - "oh-vue-icons": "^1.0.0-rc3", - "video.js": "^8.0.4", - "videojs-contrib-quality-levels": "^3.0.0", - "videojs-hls-quality-selector": "^1.1.4", - "vue": "^3.2.47", - "vue-router": "^4.1.6" - }, - "devDependencies": { - "@catppuccin/tailwindcss": "^0.1.1", - "@rushstack/eslint-patch": "^1.2.0", - "@tailwindcss/typography": "^0.5.9", - "@types/node": "^18.14.2", - "@types/videojs-contrib-quality-levels": "^2.0.1", - "@types/videojs-hls-quality-selector": "^1.1.0", - "@types/video.js": "^7.3.51", - "@vitejs/plugin-vue": "^4.0.0", - "@vue/eslint-config-prettier": "^7.1.0", - "@vue/eslint-config-typescript": "^11.0.2", - "@vue/tsconfig": "^0.1.3", - "autoprefixer": "^10.4.13", - "eslint": "^8.34.0", - "eslint-plugin-vue": "^9.9.0", - "npm-run-all": "^4.1.5", - "postcss": "^8.4.21", - "prettier": "^2.8.4", - "tailwindcss": "^3.2.7", - "typescript": "~4.8.4", - "vite": "^4.1.4", - "vue-tsc": "^1.2.0" - } -} diff --git a/frontend/index.html b/index.html similarity index 100% rename from frontend/index.html rename to index.html diff --git a/frontend/package-lock.json b/package-lock.json similarity index 100% rename from frontend/package-lock.json rename to package-lock.json diff --git a/package.json b/package.json index fd41334..9d61b64 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,46 @@ { + "name": "test", + "version": "0.0.0", + "private": true, "scripts": { - "build": "cd frontend && npm run build", - "prod": "cd server && npm run prod" + "dev": "vite", + "build": "run-p type-check build-only", + "preview": "vite preview", + "build-only": "vite build", + "type-check": "vue-tsc --noEmit", + "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", + "format": "prettier --write src/" + }, + "dependencies": { + "@dragongoose/streamlink": "^1.0.2", + "oh-vue-icons": "^1.0.0-rc3", + "video.js": "^8.0.4", + "videojs-contrib-quality-levels": "^3.0.0", + "videojs-hls-quality-selector": "^1.1.4", + "vue": "^3.2.47", + "vue-router": "^4.1.6" + }, + "devDependencies": { + "@catppuccin/tailwindcss": "^0.1.1", + "@rushstack/eslint-patch": "^1.2.0", + "@tailwindcss/typography": "^0.5.9", + "@types/node": "^18.14.2", + "@types/videojs-contrib-quality-levels": "^2.0.1", + "@types/videojs-hls-quality-selector": "^1.1.0", + "@types/video.js": "^7.3.51", + "@vitejs/plugin-vue": "^4.0.0", + "@vue/eslint-config-prettier": "^7.1.0", + "@vue/eslint-config-typescript": "^11.0.2", + "@vue/tsconfig": "^0.1.3", + "autoprefixer": "^10.4.13", + "eslint": "^8.34.0", + "eslint-plugin-vue": "^9.9.0", + "npm-run-all": "^4.1.5", + "postcss": "^8.4.21", + "prettier": "^2.8.4", + "tailwindcss": "^3.2.7", + "typescript": "~4.8.4", + "vite": "^4.1.4", + "vue-tsc": "^1.2.0" } } diff --git a/frontend/postcss.config.js b/postcss.config.js similarity index 100% rename from frontend/postcss.config.js rename to postcss.config.js diff --git a/frontend/public/favicon.ico b/public/favicon.ico similarity index 100% rename from frontend/public/favicon.ico rename to public/favicon.ico diff --git a/frontend/src/App.vue b/src/App.vue similarity index 100% rename from frontend/src/App.vue rename to src/App.vue diff --git a/frontend/src/assets/index.css b/src/assets/index.css similarity index 100% rename from frontend/src/assets/index.css rename to src/assets/index.css diff --git a/frontend/src/assets/qualitySelector.ts b/src/assets/qualitySelector.ts similarity index 100% rename from frontend/src/assets/qualitySelector.ts rename to src/assets/qualitySelector.ts diff --git a/frontend/src/components/NavbarView.vue b/src/components/NavbarView.vue similarity index 100% rename from frontend/src/components/NavbarView.vue rename to src/components/NavbarView.vue diff --git a/frontend/src/components/TwitchChat.vue b/src/components/TwitchChat.vue similarity index 100% rename from frontend/src/components/TwitchChat.vue rename to src/components/TwitchChat.vue diff --git a/frontend/src/components/VideoPlayer.vue b/src/components/VideoPlayer.vue similarity index 100% rename from frontend/src/components/VideoPlayer.vue rename to src/components/VideoPlayer.vue diff --git a/frontend/src/main.ts b/src/main.ts similarity index 100% rename from frontend/src/main.ts rename to src/main.ts diff --git a/frontend/src/router/index.ts b/src/router/index.ts similarity index 100% rename from frontend/src/router/index.ts rename to src/router/index.ts diff --git a/frontend/src/views/CategoryView.vue b/src/views/CategoryView.vue similarity index 100% rename from frontend/src/views/CategoryView.vue rename to src/views/CategoryView.vue diff --git a/frontend/src/views/HomepageView.vue b/src/views/HomepageView.vue similarity index 100% rename from frontend/src/views/HomepageView.vue rename to src/views/HomepageView.vue diff --git a/frontend/src/views/PageNotFound.vue b/src/views/PageNotFound.vue similarity index 100% rename from frontend/src/views/PageNotFound.vue rename to src/views/PageNotFound.vue diff --git a/frontend/src/views/PrivacyPageView.vue b/src/views/PrivacyPageView.vue similarity index 100% rename from frontend/src/views/PrivacyPageView.vue rename to src/views/PrivacyPageView.vue diff --git a/frontend/src/views/UserView.vue b/src/views/UserView.vue similarity index 100% rename from frontend/src/views/UserView.vue rename to src/views/UserView.vue diff --git a/frontend/tailwind.config.js b/tailwind.config.js similarity index 100% rename from frontend/tailwind.config.js rename to tailwind.config.js diff --git a/frontend/tsconfig.json b/tsconfig.json similarity index 100% rename from frontend/tsconfig.json rename to tsconfig.json diff --git a/frontend/tsconfig.node.json b/tsconfig.node.json similarity index 100% rename from frontend/tsconfig.node.json rename to tsconfig.node.json diff --git a/frontend/vite.config.ts b/vite.config.ts similarity index 100% rename from frontend/vite.config.ts rename to vite.config.ts