0
Fork 0
mirror of https://codeberg.org/SafeTwitch/safetwitch.git synced 2024-12-21 21:03:00 -05:00

Update to latest vue defaults

This commit is contained in:
dragongoose 2023-11-30 20:22:47 -05:00
parent e272bacbf6
commit a0ecaab1e5
No known key found for this signature in database
GPG key ID: 01397EEC371CDAA5
8 changed files with 1574 additions and 1397 deletions

View file

@ -11,6 +11,5 @@ module.exports = {
], ],
parserOptions: { parserOptions: {
ecmaVersion: 'latest' ecmaVersion: 'latest'
}, }
'ignorePatterns': ["*.config.*"]
} }

5
env.d.ts vendored
View file

@ -1,5 +1,10 @@
/// <reference types="vite/client" /> /// <reference types="vite/client" />
// https://github.com/intlify/vue-i18n-next/issues/1403
/// <reference types="vite/client" />
/// <reference path="node_modules/vue-i18n/dist/vue-i18n.d.ts" />
declare module 'vue-i18n'
interface ImportMetaEnv { interface ImportMetaEnv {
readonly SAFETWITCH_BACKEND_DOMAIN: string readonly SAFETWITCH_BACKEND_DOMAIN: string
readonly SAFETWITCH_INSTANCE_DOMAIN: string readonly SAFETWITCH_INSTANCE_DOMAIN: string

2881
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -3,18 +3,18 @@
"version": "2.3.1", "version": "2.3.1",
"private": true, "private": true,
"scripts": { "scripts": {
"build": "run-p type-check build-only",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"build-only": "vite build",
"dev": "vite", "dev": "vite",
"format": "prettier --write src/", "build": "run-p type-check \"build-only {@}\" --",
"i18n:report": "vue-cli-service i18n:report --src \"./src/**/*.?(js|vue)\" --locales \"./src/locales/**/*.json\"",
"preview": "vite preview", "preview": "vite preview",
"type-check": "vue-tsc --noEmit" "build-only": "vite build",
"type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false",
"lint": "eslint . --ext .vue,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"format": "prettier --write src/"
}, },
"dependencies": { "dependencies": {
"@intlify/unplugin-vue-i18n": "^0.11.0", "@intlify/unplugin-vue-i18n": "^0.11.0",
"@tailwindcss/forms": "^0.5.3", "@tailwindcss/forms": "^0.5.3",
"@types/vue-i18n": "^7.0.0",
"hls.js": "^1.4.10", "hls.js": "^1.4.10",
"oh-vue-icons": "^1.0.0-rc3", "oh-vue-icons": "^1.0.0-rc3",
"video.js": "^8.0.4", "video.js": "^8.0.4",
@ -25,30 +25,30 @@
"vue-router": "^4.1.6" "vue-router": "^4.1.6"
}, },
"devDependencies": { "devDependencies": {
"@catppuccin/tailwindcss": "^0.1.1",
"@intlify/vue-i18n-loader": "^3.0.0", "@intlify/vue-i18n-loader": "^3.0.0",
"@rushstack/eslint-patch": "^1.2.0", "@rushstack/eslint-patch": "^1.3.3",
"@tailwindcss/typography": "^0.5.9", "@tailwindcss/typography": "^0.5.9",
"@types/node": "^18.14.2", "@tsconfig/node18": "^18.2.2",
"@types/node": "^18.18.5",
"@types/video.js": "^7.3.51", "@types/video.js": "^7.3.51",
"@types/videojs-contrib-quality-levels": "^2.0.1", "@types/videojs-contrib-quality-levels": "^2.0.1",
"@types/videojs-hls-quality-selector": "^1.1.0", "@types/videojs-hls-quality-selector": "^1.1.0",
"@vitejs/plugin-vue": "^4.0.0", "@vitejs/plugin-vue": "^4.4.0",
"@vue/eslint-config-prettier": "^7.1.0", "@vue/eslint-config-prettier": "^8.0.0",
"@vue/eslint-config-typescript": "^11.0.2", "@vue/eslint-config-typescript": "^12.0.0",
"@vue/tsconfig": "^0.1.3", "@vue/tsconfig": "^0.4.0",
"autoprefixer": "^10.4.13", "autoprefixer": "^10.4.13",
"eslint": "^8.34.0", "eslint": "^8.49.0",
"eslint-plugin-vue": "^9.9.0", "eslint-plugin-vue": "^9.17.0",
"git-describe": "^4.1.1", "git-describe": "^4.1.1",
"npm-run-all": "^4.1.5", "npm-run-all2": "^6.1.1",
"postcss": "^8.4.21", "postcss": "^8.4.21",
"prettier": "^2.8.4", "prettier": "^3.0.3",
"tailwindcss": "^3.2.7", "tailwindcss": "^3.2.7",
"tailwindcss-themer": "^3.1.0", "tailwindcss-themer": "^3.1.0",
"typescript": "^5.3.2", "typescript": "~5.2.0",
"vite": "^4.1.4", "vite": "^4.5.0",
"vue-cli-plugin-i18n": "~2.3.2", "vue-cli-plugin-i18n": "~2.3.2",
"vue-tsc": "^1.2.0" "vue-tsc": "^1.8.19"
} }
} }

View file

@ -4,7 +4,7 @@ import router from './router'
import './assets/index.css' import './assets/index.css'
import i18n from './i18n' import i18n from './i18n'
const app = createApp(App).use(i18n) const app = createApp(App)
// Add protocol variable // Add protocol variable
// For some reason, import.meta.env.VITE_HTTPS === "true" // For some reason, import.meta.env.VITE_HTTPS === "true"
@ -60,4 +60,5 @@ addIcons(
app.component('v-icon', OhVueIcon) app.component('v-icon', OhVueIcon)
app.use(router) app.use(router)
app.use(i18n)
app.mount('#app') app.mount('#app')

14
tsconfig.app.json Normal file
View file

@ -0,0 +1,14 @@
{
"extends": "@vue/tsconfig/tsconfig.dom.json",
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
"exclude": ["src/**/__tests__/*"],
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
},
"target": "ESNext",
"types": ["vite/client"]
}
}

View file

@ -1,16 +1,11 @@
{ {
"extends": "@vue/tsconfig/tsconfig.web.json", "files": [],
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
},
"references": [ "references": [
{ {
"path": "./tsconfig.node.json" "path": "./tsconfig.node.json"
},
{
"path": "./tsconfig.app.json"
} }
] ]
} }

View file

@ -1,8 +1,16 @@
{ {
"extends": "@vue/tsconfig/tsconfig.node.json", "extends": "@tsconfig/node18/tsconfig.json",
"include": ["vite.config.*", "vitest.config.*", "cypress.config.*", "playwright.config.*"], "include": [
"vite.config.*",
"vitest.config.*",
"cypress.config.*",
"nightwatch.conf.*",
"playwright.config.*"
],
"compilerOptions": { "compilerOptions": {
"composite": true, "composite": true,
"module": "ESNext",
"moduleResolution": "Bundler",
"types": ["node"] "types": ["node"]
} }
} }