-
-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Fernando Fernández <ferferga@hotmail.com>
- Loading branch information
Showing
17 changed files
with
371 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { resolve } from 'node:path'; | ||
|
||
export const localeFilesFolder = resolve('locales/**'); | ||
export const localeFilesFolder = resolve(import.meta.dirname, '../locales/**'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import './src/main.ts'; | ||
/** | ||
* The Tauri-specific code must be loaded before the frontend code to ensure that | ||
* all the polyfills for the runtime have been loaded | ||
* before the frontend code is executed. | ||
* | ||
* THIS IMPORT ALWAYS NEEDS TO BE THE LAST IMPORT IN THIS FILE | ||
*/ | ||
import '@jellyfin-vue/frontend'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import type { Linter } from 'eslint'; | ||
import { getBaseConfig, getNodeFiles, getTSVueConfig, tsFiles } from '@jellyfin-vue/configs/lint'; | ||
import pkg from './package.json' with { type: 'json' }; | ||
|
||
export default [ | ||
...getBaseConfig(pkg.name), | ||
...getTSVueConfig(false, import.meta.dirname), | ||
...getNodeFiles(tsFiles) | ||
] satisfies Linter.Config[]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"name": "@jellyfin-vue/tauri-runtime", | ||
"type": "module", | ||
"description": "The frontend including tauri-specific runtime code", | ||
"scripts": { | ||
"analyze:bundle": "vite build --mode analyze:bundle", | ||
"analyze:cycles": "vite build --mode analyze:cycles", | ||
"lint": "eslint . --flag unstable_ts_config", | ||
"lint:fix": "eslint . --fix --flag unstable_ts_config", | ||
"lint:inspect": "eslint-config-inspector", | ||
"build": "vite build", | ||
"check": "npm run lint && npm run check:types", | ||
"check:types": "vue-tsc", | ||
"start": "vite", | ||
"serve": "vite preview", | ||
"prod": "npm run build && npm run serve", | ||
"clean": "git clean -fxd" | ||
}, | ||
"devDependencies": { | ||
"@jellyfin-vue/configs": "*", | ||
"vite": "6.0.7" | ||
}, | ||
"dependencies": { | ||
"@jellyfin-vue/frontend": "*" | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"extends": "@jellyfin-vue/configs/typescript", | ||
"compilerOptions": { | ||
"baseUrl": "." | ||
}, | ||
"exclude": [ | ||
"dist", | ||
"node_modules", | ||
"coverage" | ||
], | ||
"include": [ | ||
"**/*.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { resolve } from 'node:path'; | ||
import { defineConfig, mergeConfig } from 'vite'; | ||
// @ts-expect-error - This error will be fixed once the Vite team adds monorepo support for config files | ||
import BaseConfig from '../../frontend/vite.config.ts'; | ||
|
||
const host = process.env.TAURI_DEV_HOST; | ||
|
||
export default defineConfig( | ||
mergeConfig(BaseConfig, { | ||
// prevent vite from obscuring rust errors | ||
clearScreen: false, | ||
build: { | ||
outDir: resolve(import.meta.dirname, 'dist'), | ||
rollupOptions: { | ||
input: { | ||
main: resolve(import.meta.dirname, 'entrypoint.ts') | ||
} | ||
}, | ||
// don't minify for debug builds | ||
minify: process.env.TAURI_ENV_DEBUG ? false : 'esbuild', | ||
// produce sourcemaps for debug builds | ||
sourcemap: !!process.env.TAURI_ENV_DEBUG | ||
}, | ||
server: { | ||
// Tauri expects a fixed port, fail if that port is not available | ||
strictPort: true, | ||
// if the host Tauri is expecting is set, use it | ||
...(host ? { host } : {}) | ||
}, | ||
// Env variables starting with the item of `envPrefix` will be exposed in tauri's source code through `import.meta.env`. | ||
envPrefix: ['VITE_', 'TAURI_ENV_*'] | ||
}) | ||
); |
Oops, something went wrong.