Skip to content

Commit

Permalink
[Frontend] Switch to Quasar application
Browse files Browse the repository at this point in the history
  • Loading branch information
Schaka committed Nov 8, 2024
1 parent d489e3a commit d7c13b8
Show file tree
Hide file tree
Showing 49 changed files with 4,608 additions and 1,666 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ frontend {

tasks.register<Copy>("processFrontendResources") {
// Directory containing the artifacts produced by the frontend project
val frontendBuildDir = project.layout.projectDirectory.dir("src/main/frontend/dist")
val frontendBuildDir = project.layout.projectDirectory.dir("src/main/frontend/dist/spa")
val frontendResourcesDir = project.layout.buildDirectory.dir("resources/main/public")

dependsOn(":assembleFrontend")
Expand Down
9 changes: 9 additions & 0 deletions src/main/frontend/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
7 changes: 7 additions & 0 deletions src/main/frontend/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/dist
/src-capacitor
/src-cordova
/.quasar
/node_modules
.eslintrc.cjs
/quasar.config.*.temporary.compiled*
89 changes: 89 additions & 0 deletions src/main/frontend/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
module.exports = {
// https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy
// This option interrupts the configuration hierarchy at this file
// Remove this if you have an higher level ESLint config file (it usually happens into a monorepos)
root: true,

// https://eslint.vuejs.org/user-guide/#how-to-use-a-custom-parser
// Must use parserOptions instead of "parser" to allow vue-eslint-parser to keep working
// `parser: 'vue-eslint-parser'` is already included with any 'plugin:vue/**' config and should be omitted
parserOptions: {
parser: require.resolve('@typescript-eslint/parser'),
extraFileExtensions: [ '.vue' ]
},

env: {
browser: true,
es2021: true,
node: true
},

// Rules order is important, please avoid shuffling them
extends: [
// Base ESLint recommended rules
// 'eslint:recommended',

// https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#usage
// ESLint typescript rules
'plugin:@typescript-eslint/recommended',

// Uncomment any of the lines below to choose desired strictness,
// but leave only one uncommented!
// See https://eslint.vuejs.org/rules/#available-rules
'plugin:vue/vue3-essential', // Priority A: Essential (Error Prevention)
// 'plugin:vue/vue3-strongly-recommended', // Priority B: Strongly Recommended (Improving Readability)
// 'plugin:vue/vue3-recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)

// https://github.com/prettier/eslint-config-prettier#installation
// usage with Prettier, provided by 'eslint-config-prettier'.
'prettier'
],

plugins: [
// required to apply rules which need type information
'@typescript-eslint',

// https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-files
// required to lint *.vue files
'vue'

// https://github.com/typescript-eslint/typescript-eslint/issues/389#issuecomment-509292674
// Prettier has not been included as plugin to avoid performance impact
// add it as an extension for your IDE

],

globals: {
ga: 'readonly', // Google Analytics
cordova: 'readonly',
__statics: 'readonly',
__QUASAR_SSR__: 'readonly',
__QUASAR_SSR_SERVER__: 'readonly',
__QUASAR_SSR_CLIENT__: 'readonly',
__QUASAR_SSR_PWA__: 'readonly',
process: 'readonly',
Capacitor: 'readonly',
chrome: 'readonly'
},

// add your custom rules here
rules: {

'prefer-promise-reject-errors': 'off',

quotes: ['warn', 'single', { avoidEscape: true }],

// this rule, if on, would require explicit return type on the `render` function
'@typescript-eslint/explicit-function-return-type': 'off',

// in plain CommonJS modules, you can't use `import foo = require('foo')` to pass this rule, so it has to be disabled
'@typescript-eslint/no-var-requires': 'off',

// The core 'no-unused-vars' rules (in the eslint:recommended ruleset)
// does not work with type definitions
'no-unused-vars': 'off',

// allow debugger during development only
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
}
}
41 changes: 22 additions & 19 deletions src/main/frontend/.gitignore
Original file line number Diff line number Diff line change
@@ -1,30 +1,33 @@
# Logs
logs
*.log
.DS_Store
.thumbs.db
node_modules

# Quasar core related directories
.quasar
/dist
/quasar.config.*.temporary.compiled*

# Cordova related directories and files
/src-cordova/node_modules
/src-cordova/platforms
/src-cordova/plugins
/src-cordova/www

# Capacitor related directories and files
/src-capacitor/www
/src-capacitor/node_modules

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
.DS_Store
dist
dist-ssr
coverage
*.local

/cypress/videos/
/cypress/screenshots/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

*.tsbuildinfo
# local .env files
.env.local*
5 changes: 5 additions & 0 deletions src/main/frontend/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# pnpm-related options
shamefully-hoist=true
strict-peer-dependencies=false
# to get the latest compatible packages when creating the project https://github.com/pnpm/pnpm/issues/6463
resolution-mode=highest
4 changes: 4 additions & 0 deletions src/main/frontend/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"semi": true
}
1 change: 0 additions & 1 deletion src/main/frontend/env.d.ts

This file was deleted.

22 changes: 15 additions & 7 deletions src/main/frontend/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
<!DOCTYPE html>
<html lang="">
<html>
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title>
<title><%= productName %></title>

<meta charset="utf-8">
<meta name="description" content="<%= productDescription %>">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (ctx.mode.cordova || ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>">

<link rel="icon" type="image/png" sizes="128x128" href="icons/favicon-128x128.png">
<link rel="icon" type="image/png" sizes="96x96" href="icons/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="32x32" href="icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="icons/favicon-16x16.png">
<link rel="icon" type="image/ico" href="favicon.ico">
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
<!-- quasar:entry-point -->
</body>
</html>
53 changes: 32 additions & 21 deletions src/main/frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,42 @@
{
"name": "frontend",
"version": "0.0.0",
"private": true,
"name": "naviseerr",
"version": "0.0.1",
"description": "Music manager",
"productName": "Naviseerr",
"author": "schaka <[email protected]>",
"type": "module",
"private": true,
"scripts": {
"dev": "vite",
"build": "run-p type-check \"build-only {@}\" --",
"preview": "vite preview",
"build-only": "vite build",
"type-check": "vue-tsc --build --force"
"lint": "eslint --ext .js,.ts,.vue ./",
"format": "prettier --write \"**/*.{js,ts,vue,scss,html,md,json}\" --ignore-path .gitignore",
"test": "echo \"No test specified\" && exit 0",
"dev": "quasar dev",
"build": "quasar build"
},
"dependencies": {
"pinia": "^2.2.6",
"vue": "^3.5.12",
"vue-router": "^4.4.5"
"@quasar/extras": "^1.16.4",
"quasar": "^2.16.0",
"vue": "^3.4.18",
"vue-router": "^4.0.12"
},
"devDependencies": {
"@tsconfig/node20": "^20.1.4",
"@types/node": "^20.17.6",
"@vitejs/plugin-vue": "^5.1.4",
"@vitejs/plugin-vue-jsx": "^4.0.1",
"@vue/tsconfig": "^0.5.1",
"npm-run-all2": "^7.0.1",
"typescript": "~5.6.3",
"vite": "^5.4.10",
"vite-plugin-vue-devtools": "^7.5.4",
"vue-tsc": "^2.1.10"
"@typescript-eslint/eslint-plugin": "^7.16.0",
"@typescript-eslint/parser": "^7.16.0",
"vite-plugin-checker": "^0.8.0",
"vue-tsc": "^2.0.29",
"eslint": "^8.57.0",
"eslint-plugin-vue": "^9.0.0",
"eslint-config-prettier": "^9.0.0",
"prettier": "^3.0.3",
"@types/node": "^20.5.9",
"@quasar/app-vite": "^2.0.0-beta.12",
"autoprefixer": "^10.4.2",
"typescript": "~5.5.3"
},
"engines": {
"node": "^24 || ^22 || ^20 || ^18",
"npm": ">= 6.13.4",
"yarn": ">= 1.21.1"
},
"packageManager": "[email protected]"
}
Loading

0 comments on commit d7c13b8

Please sign in to comment.