diff --git a/.eslintignore b/.eslintignore index 6c70242..f78c8ac 100644 --- a/.eslintignore +++ b/.eslintignore @@ -4,5 +4,4 @@ /.quasar /node_modules .eslintrc.js -/src-ssr /quasar.config.*.temporary.compiled* diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 796b2e8..94b0a63 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -4,19 +4,14 @@ module.exports = { // 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' ] + ecmaVersion: 2021, // Allows for the parsing of modern ECMAScript features }, env: { - browser: true, - es2021: true, node: true, - 'vue/setup-compiler-macros': true + browser: true, + 'vue/setup-compiler-macros': true, }, // Rules order is important, please avoid shuffling them @@ -24,10 +19,6 @@ module.exports = { // 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 @@ -37,21 +28,17 @@ module.exports = { // https://github.com/prettier/eslint-config-prettier#installation // usage with Prettier, provided by 'eslint-config-prettier'. - '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' - + '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: { @@ -64,27 +51,14 @@ module.exports = { __QUASAR_SSR_PWA__: 'readonly', process: 'readonly', Capacitor: 'readonly', - chrome: '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' - } -} + 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', + }, +}; diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 650cb88..0000000 --- a/.prettierrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "singleQuote": true, - "semi": true -} diff --git a/.vscode/settings.json b/.vscode/settings.json index 796a56d..336c3a7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,27 +1,22 @@ { - "editor.bracketPairColorization.enabled": true, - "editor.guides.bracketPairs": true, "editor.formatOnSave": true, - "editor.defaultFormatter": "esbenp.prettier-vscode", - "editor.codeActionsOnSave": [ - "source.addMissingImports", - "source.organizeImports", - "source.fixAll.eslint" - ], - "eslint.validate": ["javascript", "javascriptreact", "typescript", "vue"], - "typescript.tsdk": "node_modules/typescript/lib", "editor.formatOnPaste": true, "editor.minimap.enabled": false, "editor.tabSize": 2, "editor.fontSize": 14, "editor.fontWeight": "normal", "editor.guides.highlightActiveBracketPair": true, + "editor.bracketPairColorization.enabled": true, "editor.bracketPairColorization.independentColorPoolPerBracketType": true, + "editor.guides.bracketPairs": true, "editor.guides.bracketPairsHorizontal": true, "editor.acceptSuggestionOnEnter": "smart", "editor.tabCompletion": "on", + "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.linkedEditing": true, "terminal.integrated.cursorStyleInactive": "line", + "workbench.iconTheme": "material-icon-theme", + "workbench.colorTheme": "Default Dark+", "files.exclude": { "**/.git": true, "**/.svn": true, @@ -32,11 +27,16 @@ }, "files.trimTrailingWhitespace": true, "files.trimFinalNewlines": true, + "material-icon-theme.files.color": "#42a5f5", + "material-icon-theme.folders.theme": "specific", + "material-icon-theme.activeIconPack": "react", + "material-icon-theme.folders.color": "#42a5f5", "prettier.arrowParens": "always", "prettier.tabWidth": 2, "prettier.singleQuote": true, "prettier.semi": true, "prettier.printWidth": 175, + "eslint.validate": ["javascript", "javascriptvue"], "explorer.compactFolders": false, "terminal.integrated.env.windows": {}, "git.enableSmartCommit": true, @@ -44,7 +44,6 @@ "console-ninja.fontSize": 12, "git.autofetch": true, "git.confirmSync": false, - "errorLens.excludeBySource": ["eslint(react/prop-types)"], "javascript.updateImportsOnFileMove.enabled": "always", "console-ninja.featureSet": "Community", "liveServer.settings.donotShowInfoMsg": true, @@ -56,16 +55,24 @@ "terminal.integrated.enableImages": true, "figma.autocompleteBlocks": true, "figma.assetExportDirectory": "src/assets", + "editor.codeActionsOnSave": [ + "source.addMissingImports", + "source.organizeImports", + "source.fixAll.eslint" + ], "liveServer.settings.donotVerifyTags": true, "gitlens.gitCommands.skipConfirmations": ["fetch:command", "switch:command"], "symbols.hidesExplorerArrows": false, - "editor.fontFamily": "CaskaydiaCove Nerd Font", "diffEditor.ignoreTrimWhitespace": false, - "terminal.integrated.fontFamily": "CaskaydiaCove Nerd Font", "svg.preview.mode": "svg", "[svg]": { "editor.defaultFormatter": "jock.svg" }, + "[vue]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, "workbench.tree.indent": 16, - "git.ignoreRebaseWarning": true + "window.zoomLevel": 0, + "git.ignoreRebaseWarning": true, + "editor.largeFileOptimizations": false } diff --git a/README.md b/README.md index 38ed940..48010c1 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ A floranet app ## Install the dependencies + ```bash yarn # or @@ -10,32 +11,33 @@ npm install ``` ### Start the app in development mode (hot-code reloading, error reporting, etc.) + ```bash quasar dev ``` - ### Lint the files + ```bash yarn lint # or npm run lint ``` - ### Format the files + ```bash yarn format # or npm run format ``` - - ### Build the app for production + ```bash quasar build ``` ### Customize the configuration + See [Configuring quasar.config.js](https://v2.quasar.dev/quasar-cli-vite/quasar-config-js). diff --git a/index.html b/index.html index cb841d0..15b9fbc 100644 --- a/index.html +++ b/index.html @@ -43,6 +43,14 @@ href="https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Mulish:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;0,1000;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900;1,1000&family=Questrial&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet" /> + +
diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 0000000..dcce845 --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "paths": { + "src/*": ["src/*"], + "app/*": ["*"], + "components/*": ["src/components/*"], + "layouts/*": ["src/layouts/*"], + "pages/*": ["src/pages/*"], + "assets/*": ["src/assets/*"], + "boot/*": ["src/boot/*"], + "stores/*": ["src/stores/*"], + "vue$": ["node_modules/vue/dist/vue.runtime.esm-bundler.js"] + } + }, + "exclude": ["dist", ".quasar", "node_modules"] +} diff --git a/package-lock.json b/package-lock.json index 17d3362..1f42626 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,27 +14,24 @@ "axios": "^1.2.1", "pinia": "^2.0.11", "quasar": "^2.6.0", - "v-mask": "^2.3.0", "vee-validate": "^4.12.2", "vue": "^3.0.0", + "vue-i18n": "^9.0.0", "vue-image-zoomer": "^2.2.3", "vue-router": "^4.0.0", "zod": "^3.22.4" }, "devDependencies": { - "@babel/types": "^7.23.6", "@faker-js/faker": "^8.3.1", + "@intlify/vite-plugin-vue-i18n": "^3.3.1", "@quasar/app-vite": "^1.3.0", - "@types/node": "^12.20.21", - "@typescript-eslint/eslint-plugin": "^5.10.0", - "@typescript-eslint/parser": "^5.10.0", "autoprefixer": "^10.4.2", "eslint": "^8.10.0", "eslint-config-prettier": "^8.1.0", "eslint-plugin-vue": "^9.0.0", "json-server": "^0.17.4", - "prettier": "^2.5.1", - "typescript": "^4.5.4" + "postcss": "^8.4.14", + "prettier": "^2.5.1" }, "engines": { "node": "^18 || ^16 || ^14.19", @@ -51,24 +48,6 @@ "node": ">=0.10.0" } }, - "node_modules/@babel/helper-string-parser": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", - "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/parser": { "version": "7.23.6", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.6.tgz", @@ -80,20 +59,6 @@ "node": ">=6.0.0" } }, - "node_modules/@babel/types": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.6.tgz", - "integrity": "sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==", - "dev": true, - "dependencies": { - "@babel/helper-string-parser": "^7.23.4", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -199,6 +164,101 @@ "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", "dev": true }, + "node_modules/@intlify/bundle-utils": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@intlify/bundle-utils/-/bundle-utils-2.2.2.tgz", + "integrity": "sha512-vngkvlIVV8ZJoyC5VqMvqJd2nvsx+qMN7pQjPiPjOrVndeiR7Dlue0k86Q8FsFUzyksW3HJZZi833ldxwbFzTA==", + "dev": true, + "dependencies": { + "@intlify/message-compiler": "^9.1.0", + "@intlify/shared": "^9.1.0", + "jsonc-eslint-parser": "^1.0.1", + "source-map": "^0.6.1", + "yaml-eslint-parser": "^0.3.2" + }, + "engines": { + "node": ">= 12" + }, + "peerDependenciesMeta": { + "petite-vue-i18n": { + "optional": true + }, + "vue-i18n": { + "optional": true + } + } + }, + "node_modules/@intlify/core-base": { + "version": "9.8.0", + "resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-9.8.0.tgz", + "integrity": "sha512-UxaSZVZ1DwqC/CltUZrWZNaWNhfmKtfyV4BJSt/Zt4Or/fZs1iFj0B+OekYk1+MRHfIOe3+x00uXGQI4PbO/9g==", + "dependencies": { + "@intlify/message-compiler": "9.8.0", + "@intlify/shared": "9.8.0" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + } + }, + "node_modules/@intlify/message-compiler": { + "version": "9.8.0", + "resolved": "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-9.8.0.tgz", + "integrity": "sha512-McnYWhcoYmDJvssVu6QGR0shqlkJuL1HHdi5lK7fNqvQqRYaQ4lSLjYmZxwc8tRNMdIe9/KUKfyPxU9M6yCtNQ==", + "dependencies": { + "@intlify/shared": "9.8.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + } + }, + "node_modules/@intlify/shared": { + "version": "9.8.0", + "resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-9.8.0.tgz", + "integrity": "sha512-TmgR0RCLjzrSo+W3wT0ALf9851iFMlVI9EYNGeWvZFUQTAJx0bvfsMlPdgVtV1tDNRiAfhkFsMKu6jtUY1ZLKQ==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + } + }, + "node_modules/@intlify/vite-plugin-vue-i18n": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@intlify/vite-plugin-vue-i18n/-/vite-plugin-vue-i18n-3.4.0.tgz", + "integrity": "sha512-XXcZBgwJ+3FRu11c4ARoY9N00kElPii0/jNZ49qR045Ka7/YGCwb1Ku14BBlMSEHiHDSjLQknLwrJKSQGVZLyA==", + "dev": true, + "dependencies": { + "@intlify/bundle-utils": "^2.2.2", + "@intlify/shared": "^9.1.0", + "@rollup/pluginutils": "^4.1.0", + "debug": "^4.3.1", + "fast-glob": "^3.2.5", + "source-map": "0.6.1" + }, + "engines": { + "node": ">= 12" + }, + "peerDependencies": { + "petite-vue-i18n": "^9.1.0", + "vite": "^2.0.0", + "vue-i18n": "^9.1.0" + }, + "peerDependenciesMeta": { + "petite-vue-i18n": { + "optional": true + }, + "vue-i18n": { + "optional": true + } + } + }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", @@ -476,12 +536,6 @@ "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==", "dev": true }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true - }, "node_modules/@types/mime": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", @@ -506,12 +560,6 @@ "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", "dev": true }, - "node_modules/@types/semver": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", - "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", - "dev": true - }, "node_modules/@types/send": { "version": "0.17.4", "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", @@ -538,194 +586,6 @@ "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz", "integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==" }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", - "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", - "dev": true, - "dependencies": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/type-utils": "5.62.0", - "@typescript-eslint/utils": "5.62.0", - "debug": "^4.3.4", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz", - "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", - "dev": true, - "dependencies": { - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", - "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", - "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", - "dev": true, - "dependencies": { - "@typescript-eslint/typescript-estree": "5.62.0", - "@typescript-eslint/utils": "5.62.0", - "debug": "^4.3.4", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/types": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", - "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", - "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", - "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", - "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, "node_modules/@ungap/structured-clone": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", @@ -1134,15 +994,6 @@ "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", "dev": true }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", @@ -1960,18 +1811,6 @@ "npm": "1.2.8000 || >= 1.4.16" } }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -2530,17 +2369,28 @@ "eslint": "^6.2.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "node_modules/eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", "dev": true, "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" + "eslint-visitor-keys": "^1.1.0" }, "engines": { - "node": ">=8.0.0" + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" } }, "node_modules/eslint-visitor-keys": { @@ -2651,15 +2501,6 @@ "node": ">=4.0" } }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/estree-walker": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", @@ -3163,26 +3004,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", @@ -3691,6 +3512,66 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, + "node_modules/jsonc-eslint-parser": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsonc-eslint-parser/-/jsonc-eslint-parser-1.4.1.tgz", + "integrity": "sha512-hXBrvsR1rdjmB2kQmUjf1rEIa+TqHBGMge8pwi++C+Si1ad7EjZrJcpgwym+QGK/pqTx+K7keFAtLlVNdLRJOg==", + "dev": true, + "dependencies": { + "acorn": "^7.4.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^1.3.0", + "espree": "^6.0.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/jsonc-eslint-parser/node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/jsonc-eslint-parser/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/jsonc-eslint-parser/node_modules/espree": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", + "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "dev": true, + "dependencies": { + "acorn": "^7.1.1", + "acorn-jsx": "^5.2.0", + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/jsonc-eslint-parser/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -4124,12 +4005,6 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, - "node_modules/natural-compare-lite": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", - "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "dev": true - }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", @@ -4412,15 +4287,6 @@ "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", "dev": true }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -5158,15 +5024,6 @@ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/slice-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", @@ -5397,15 +5254,6 @@ "node": ">=0.6.0" } }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -5433,27 +5281,6 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "dev": true }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "node_modules/tsutils/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -5494,7 +5321,8 @@ "version": "4.9.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "devOptional": true, + "optional": true, + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -5593,11 +5421,6 @@ "node": ">= 0.4.0" } }, - "node_modules/v-mask": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v-mask/-/v-mask-2.3.0.tgz", - "integrity": "sha512-ap7pTtCTvj25CqX4VYXqudCBd0+XvYyhiiLbzWQQR7AMQosJ2+DPu0a94P9stk0EGmGcmYxJaPkFkfjD8hquWQ==" - }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -5725,6 +5548,25 @@ "node": ">=4.0" } }, + "node_modules/vue-i18n": { + "version": "9.8.0", + "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-9.8.0.tgz", + "integrity": "sha512-Izho+6PYjejsTq2mzjcRdBZ5VLRQoSuuexvR8029h5CpN03FYqiqBrShMyf2I1DKkN6kw/xmujcbvC+4QybpsQ==", + "dependencies": { + "@intlify/core-base": "9.8.0", + "@intlify/shared": "9.8.0", + "@vue/devtools-api": "^6.5.0" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + }, + "peerDependencies": { + "vue": "^3.0.0" + } + }, "node_modules/vue-image-zoomer": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/vue-image-zoomer/-/vue-image-zoomer-2.2.3.tgz", @@ -5835,6 +5677,35 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, + "node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/yaml-eslint-parser": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/yaml-eslint-parser/-/yaml-eslint-parser-0.3.2.tgz", + "integrity": "sha512-32kYO6kJUuZzqte82t4M/gB6/+11WAuHiEnK7FreMo20xsCKPeFH5tDBU7iWxR7zeJpNnMXfJyXwne48D0hGrg==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^1.3.0", + "lodash": "^4.17.20", + "yaml": "^1.10.0" + } + }, + "node_modules/yaml-eslint-parser/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", diff --git a/package.json b/package.json index 2519361..19a5d09 100644 --- a/package.json +++ b/package.json @@ -6,42 +6,38 @@ "author": "user", "private": true, "scripts": { - "lint": "eslint --ext .js,.ts,.vue ./", - "format": "prettier --write \"**/*.{js,ts,vue,scss,html,md,json}\" --ignore-path .gitignore", + "lint": "eslint --ext .js,.vue ./", + "format": "prettier --write \"**/*.{js,vue,scss,html,md,json}\" --ignore-path .gitignore", "dev": "quasar dev -m ssr", - "backend": "json-server -p 5000 -d 3000 -w src/services/json-server/db.json", "build": "quasar build -m ssr", "start:build": "npm run build && cd dist/ssr && npm i && npm run start", - "typecheck": "tsc --project tsconfig.json --noEmit" + "backend": "json-server -p 5000 -d 600 -w src/services/json-server/db.json" }, "dependencies": { - "@quasar/extras": "^1.16.4", "@vee-validate/zod": "^4.12.2", "@vueuse/core": "^10.7.0", - "axios": "^1.2.1", - "pinia": "^2.0.11", - "quasar": "^2.6.0", - "v-mask": "^2.3.0", "vee-validate": "^4.12.2", - "vue": "^3.0.0", "vue-image-zoomer": "^2.2.3", - "vue-router": "^4.0.0", - "zod": "^3.22.4" + "zod": "^3.22.4", + "axios": "^1.2.1", + "vue-i18n": "^9.0.0", + "pinia": "^2.0.11", + "@quasar/extras": "^1.16.4", + "quasar": "^2.6.0", + "vue": "^3.0.0", + "vue-router": "^4.0.0" }, "devDependencies": { - "@babel/types": "^7.23.6", "@faker-js/faker": "^8.3.1", - "@quasar/app-vite": "^1.3.0", - "@types/node": "^12.20.21", - "@typescript-eslint/eslint-plugin": "^5.10.0", - "@typescript-eslint/parser": "^5.10.0", - "autoprefixer": "^10.4.2", - "eslint": "^8.10.0", - "eslint-config-prettier": "^8.1.0", - "eslint-plugin-vue": "^9.0.0", "json-server": "^0.17.4", + "eslint": "^8.10.0", + "eslint-plugin-vue": "^9.0.0", + "eslint-config-prettier": "^8.1.0", "prettier": "^2.5.1", - "typescript": "^4.5.4" + "@intlify/vite-plugin-vue-i18n": "^3.3.1", + "@quasar/app-vite": "^1.3.0", + "autoprefixer": "^10.4.2", + "postcss": "^8.4.14" }, "engines": { "node": "^18 || ^16 || ^14.19", diff --git a/postcss.config.cjs b/postcss.config.cjs index 94b7b1c..8bfb534 100644 --- a/postcss.config.cjs +++ b/postcss.config.cjs @@ -13,9 +13,9 @@ module.exports = { 'last 4 Android versions', 'last 4 ChromeAndroid versions', 'last 4 FirefoxAndroid versions', - 'last 4 iOS versions' - ] - }) + 'last 4 iOS versions', + ], + }), // https://github.com/elchininet/postcss-rtlcss // If you want to support RTL css, then @@ -23,5 +23,5 @@ module.exports = { // 2. optionally set quasar.config.js > framework > lang to an RTL language // 3. uncomment the following line: // require('postcss-rtlcss') - ] -} + ], +}; diff --git a/quasar.config.js b/quasar.config.js index 37c88ed..7af8b1f 100644 --- a/quasar.config.js +++ b/quasar.config.js @@ -8,7 +8,8 @@ // Configuration for your app // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js -const { configure } = require('quasar/wrappers'); +const { configure } = require("quasar/wrappers"); +const path = require("path"); module.exports = configure(function (/* ctx */) { return { @@ -27,10 +28,10 @@ module.exports = configure(function (/* ctx */) { // app boot file (/src/boot) // --> boot files are part of "main.js" // https://v2.quasar.dev/quasar-cli-vite/boot-files - boot: ['axios', { server: false, path: 'brand-colors' }], + boot: ["i18n", "axios"], // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css - css: ['app.scss'], + css: ["app.scss"], // https://github.com/quasarframework/quasar/tree/dev/extras extras: [ @@ -42,18 +43,18 @@ module.exports = configure(function (/* ctx */) { // 'line-awesome', // 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both! - 'roboto-font', // optional, you are not bound to it - 'material-icons', // optional, you are not bound to it + "roboto-font", // optional, you are not bound to it + "material-icons", // optional, you are not bound to it ], // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#build build: { target: { - browser: ['es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1'], - node: 'node16', + browser: ["es2019", "edge88", "firefox78", "chrome87", "safari13.1"], + node: "node16", }, - vueRouterMode: 'hash', // available values: 'hash', 'history' + vueRouterMode: "hash", // available values: 'hash', 'history' // vueRouterBase, // vueDevtools, // vueOptionsAPI: false, @@ -70,11 +71,31 @@ module.exports = configure(function (/* ctx */) { // distDir // extendViteConf (viteConf) {}, - // viteVuePluginOptions: {}, + viteVuePluginOptions: { + template: { + compilerOptions: { + isCustomElement: (tag) => + ["swiper-slide", "swiper-container"].includes(tag), + }, + }, + }, - // vitePlugins: [ - // [ 'package-name', { ..options.. } ] - // ] + vitePlugins: [ + [ + "@intlify/vite-plugin-vue-i18n", + { + // if you want to use Vue I18n Legacy API, you need to set `compositionOnly: false` + // compositionOnly: false, + + // if you want to use named tokens in your Vue I18n messages, such as 'Hello {name}', + // you need to set `runtimeOnly: false` + // runtimeOnly: false, + + // you need to set i18n resource including paths ! + include: path.resolve(__dirname, "./src/i18n/**"), + }, + ], + ], }, // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#devServer @@ -85,13 +106,7 @@ module.exports = configure(function (/* ctx */) { // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework framework: { - config: { - loading: { - backgroundColor: 'tomato', - message: 'loading page', - customClass: 'loader', - }, - }, + config: {}, // iconSet: 'material-icons', // Quasar icon set // lang: 'en-US', // Quasar language pack @@ -104,7 +119,7 @@ module.exports = configure(function (/* ctx */) { // directives: [], // Quasar plugins - plugins: ['Meta', 'Loading'], + plugins: ["Meta", "Loading"], }, // animations: 'all', // --- includes all animations @@ -140,16 +155,16 @@ module.exports = configure(function (/* ctx */) { // (gets superseded if process.env.PORT is specified at runtime) middlewares: [ - 'render', // keep this as last one + "render", // keep this as last one ], }, // https://v2.quasar.dev/quasar-cli-vite/developing-pwa/configuring-pwa pwa: { - workboxMode: 'generateSW', // or 'injectManifest' + workboxMode: "generateSW", // or 'injectManifest' injectPwaMetaTags: true, - swFilename: 'sw.js', - manifestFilename: 'manifest.json', + swFilename: "sw.js", + manifestFilename: "manifest.json", useCredentialsForManifestTag: false, // useFilenameHashes: true, // extendGenerateSWOptions (cfg) {} @@ -175,7 +190,7 @@ module.exports = configure(function (/* ctx */) { inspectPort: 5858, - bundler: 'packager', // 'packager' or 'builder' + bundler: "packager", // 'packager' or 'builder' packager: { // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options @@ -191,13 +206,13 @@ module.exports = configure(function (/* ctx */) { builder: { // https://www.electron.build/configuration/configuration - appId: 'floranet', + appId: "floranet", }, }, // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-browser-extensions/configuring-bex bex: { - contentScripts: ['my-content-script'], + contentScripts: ["my-content-script"], // extendBexScriptsConf (esbuildConf) {} // extendBexManifestJson (json) {} diff --git a/src-ssr/middlewares/render.ts b/src-ssr/middlewares/render.js similarity index 83% rename from src-ssr/middlewares/render.ts rename to src-ssr/middlewares/render.js index 2d4211b..00048b9 100644 --- a/src-ssr/middlewares/render.ts +++ b/src-ssr/middlewares/render.js @@ -1,5 +1,4 @@ -import { RenderError } from '@quasar/app-vite'; -import { ssrMiddleware } from 'quasar/wrappers'; +import { ssrMiddleware } from "quasar/wrappers"; // This middleware should execute as last one // since it captures everything and tries to @@ -8,15 +7,15 @@ import { ssrMiddleware } from 'quasar/wrappers'; export default ssrMiddleware(({ app, resolve, render, serve }) => { // we capture any other Express route and hand it // over to Vue and Vue Router to render our page - app.get(resolve.urlPath('*'), (req, res) => { - res.setHeader('Content-Type', 'text/html'); + app.get(resolve.urlPath("*"), (req, res) => { + res.setHeader("Content-Type", "text/html"); render(/* the ssrContext: */ { req, res }) .then((html) => { // now let's send the rendered html to the client res.send(html); }) - .catch((err: RenderError) => { + .catch((err) => { // oops, we had an error while rendering the page // we were told to redirect to another URL @@ -31,7 +30,7 @@ export default ssrMiddleware(({ app, resolve, render, serve }) => { // Should reach here only if no "catch-all" route // is defined in /src/routes - res.status(404).send('404 | Page Not Found'); + res.status(404).send("404 | Page Not Found"); } else if (process.env.DEV) { // well, we treat any other code as error; // if we're in dev mode, then we can use Quasar CLI @@ -48,7 +47,7 @@ export default ssrMiddleware(({ app, resolve, render, serve }) => { // Render Error Page on production or // create a route (/src/routes) for an error page and redirect to it - res.status(500).send('500 | Internal Server Error'); + res.status(500).send("500 | Internal Server Error"); if (process.env.DEBUGGING) { console.error(err.stack); diff --git a/src-ssr/server.ts b/src-ssr/server.js similarity index 94% rename from src-ssr/server.ts rename to src-ssr/server.js index e98ee83..4d42f50 100644 --- a/src-ssr/server.ts +++ b/src-ssr/server.js @@ -9,15 +9,15 @@ * Make sure to yarn add / npm install (in your project root) * anything you import here (except for express and compression). */ -import express from 'express'; -import compression from 'compression'; +import compression from "compression"; +import express from "express"; import { ssrClose, ssrCreate, ssrListen, ssrRenderPreloadTag, ssrServeStaticContent, -} from 'quasar/wrappers'; +} from "quasar/wrappers"; /** * Create your webserver and return its instance. @@ -31,7 +31,7 @@ export const create = ssrCreate((/* { ... } */) => { // attackers can use this header to detect apps running Express // and then launch specifically-targeted attacks - app.disable('x-powered-by'); + app.disable("x-powered-by"); // place here any middlewares that // absolutely need to run before anything else @@ -57,7 +57,7 @@ export const listen = ssrListen(async ({ app, port, isReady }) => { await isReady(); return app.listen(port, () => { if (process.env.PROD) { - console.log('Server listening at port ' + port); + console.log("Server listening at port " + port); } }); }); @@ -130,5 +130,5 @@ export const renderPreloadTag = ssrRenderPreloadTag((file) => { return ``; } - return ''; + return ""; }); diff --git a/src/App.vue b/src/App.vue index ddfb546..766718e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -2,7 +2,7 @@