Skip to content

Commit

Permalink
Merge branch 'main' into ui-bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
iva2k committed Jan 5, 2024
2 parents f0f16f6 + b53f02b commit 58d145a
Show file tree
Hide file tree
Showing 21 changed files with 1,334 additions and 854 deletions.
27 changes: 17 additions & 10 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,35 +1,42 @@
/** @type { import("eslint").Linter.Config } */
module.exports = {
root: true,
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended', // Note: This does not include TS type checks.
// 'plugin:@typescript-eslint/recommended-type-checked', // This does type-checking, but breaks in .svelte files and few .ts places
'plugin:svelte/recommended',
'plugin:import/recommended',
'plugin:storybook/recommended',
'prettier'
],
parser: '@typescript-eslint/parser',
plugins: ['svelte3', '@typescript-eslint', 'import'],
plugins: ['@typescript-eslint', 'import'],
ignorePatterns: ['*.cjs'],
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
overrides: [
{
files: ['*.svelte'],
parser: 'svelte-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser'
}
}
],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.svelte']
},
'import/resolver': {
typescript: {}
},
'svelte3/typescript': () => require('typescript')
}
},
parserOptions: {
project: ['./tsconfig.json', './tsconfig.lint.json'],
tsconfigRootDir: './',
sourceType: 'module',
ecmaVersion: 2022,
ecmaVersion: 2020,
extraFileExtensions: ['.svelte']
},
env: {
browser: true,
es2022: true,
es2017: true,
node: true
},
rules: {
Expand Down
1 change: 0 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }],
"plugins": ["prettier-plugin-svelte"],
"pluginSearchDirs": ["."],
"printWidth": 100,
"singleQuote": true,
"tabWidth": 2,
Expand Down
2 changes: 1 addition & 1 deletion CREATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ pnpm add -D @vite-pwa/sveltekit @types/workbox-build@^5.0.1 vite-plugin-pwa@^0.1
Create files and make some changes (see sources):
- Add /dev-dist to .gitignore, .eslintignore, .prettierignore
- Patch @vite-pwa/sveltekit to fix problem with import in TypeScript, see file "patches/@vite-pwa__sveltekit@0.0.1.patch" for a hot-fix.
- Patch @vite-pwa/sveltekit to fix problem with import in TypeScript, see file `patches/@vite-pwa__sveltekit@0.0.1.patch` for a hot-fix.
- Add SvelteKitPWA to "vite.config.ts"
- Create "src/lib/components/offline/Offline.svelte"
- Create "src/lib/components/reloadprompt/ReloadPrompt.svelte"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<img src="static/logotype-hor.svg" alt="Total App" />
</td>
<td align=center>Storybook</td>
<td align=center><a href="https://app.netlify.com/sites/svelte-blank-20221125/deploys"><img src="https://api.netlify.com/api/v1/badges/90e9b7ab-f139-4ad9-a84b-3501d18d98cb/deploy-status"/></a></td>
<td align=center><a href="https://vercel.com/iva2k/svelte-blank-20221125"><img src="https://shields.io/github/deployments/iva2k/svelte-blank-20221125/production?style=flat&label=vercel&logo=vercel"/></a></td>
<td align=center><a href="https://app.netlify.com/sites/svelte-blank-20221125/deploys"><img src="https://api.netlify.com/api/v1/badges/90e9b7ab-f139-4ad9-a84b-3501d18d98cb/deploy-status" alt="Netlify shield"/></a></td>
<td align=center><a href="https://vercel.com/iva2k/svelte-blank-20221125"><img src="https://shields.io/github/deployments/iva2k/svelte-blank-20221125/production?style=flat&label=vercel&logo=vercel" alt="Vercel shield"/></a></td>
</tr>
<tr>
<td align=center><a href=https://www.chromatic.com/builds?appId=63839ed0e936a148379c5c65>Chromatic</a></td>
Expand Down
4 changes: 2 additions & 2 deletions android/capacitor.settings.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
include ':capacitor-android'
project(':capacitor-android').projectDir = new File('../node_modules/.pnpm/@capacitor+android@4.6.1_@capacitor+core@4.6.1/node_modules/@capacitor/android/capacitor')
project(':capacitor-android').projectDir = new File('../node_modules/.pnpm/@capacitor+android@4.8.1_@capacitor+core@4.8.1/node_modules/@capacitor/android/capacitor')

include ':capacitor-geolocation'
project(':capacitor-geolocation').projectDir = new File('../node_modules/.pnpm/@capacitor+geolocation@4.1.0_@capacitor+core@4.6.1/node_modules/@capacitor/geolocation/android')
project(':capacitor-geolocation').projectDir = new File('../node_modules/.pnpm/@capacitor+geolocation@4.1.0_@capacitor+core@4.8.1/node_modules/@capacitor/geolocation/android')
6 changes: 3 additions & 3 deletions ios/App/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ use_frameworks!
install! 'cocoapods', :disable_input_output_paths => true

def capacitor_pods
pod 'Capacitor', :path => '../../node_modules/.pnpm/@capacitor+ios@4.6.1_@capacitor+core@4.6.1/node_modules/@capacitor/ios'
pod 'CapacitorCordova', :path => '../../node_modules/.pnpm/@capacitor+ios@4.6.1_@capacitor+core@4.6.1/node_modules/@capacitor/ios'
pod 'CapacitorGeolocation', :path => '../../node_modules/.pnpm/@capacitor+geolocation@4.1.0_@capacitor+core@4.6.1/node_modules/@capacitor/geolocation'
pod 'Capacitor', :path => '../../node_modules/.pnpm/@capacitor+ios@4.8.1_@capacitor+core@4.8.1/node_modules/@capacitor/ios'
pod 'CapacitorCordova', :path => '../../node_modules/.pnpm/@capacitor+ios@4.8.1_@capacitor+core@4.8.1/node_modules/@capacitor/ios'
pod 'CapacitorGeolocation', :path => '../../node_modules/.pnpm/@capacitor+geolocation@4.1.0_@capacitor+core@4.8.1/node_modules/@capacitor/geolocation'
end

target 'App' do
Expand Down
86 changes: 41 additions & 45 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"svelte:predev": "echo RUN svelte:predev && rimraf dev-dist && svelte-kit sync && tsx scripts/assets-copy.ts",
"dev": " echo RUN dev(:http) && pnpm svelte:predev && cross-env SW_DEV=true DEBUG=vite-plugin-pwa:* NO_HTTPS=1 vite dev --port 3000",
"dev:http": " pnpm dev",
"dev:https": " echo RUN dev:https && pnpm svelte:predev && cross-env SW_DEV=true DEBUG=vite-plugin-pwa:* vite dev --port 3000 --https",
"dev:https": " echo RUN dev:https && pnpm svelte:predev && cross-env SW_DEV=true DEBUG=vite-plugin-pwa:* vite dev --port 3000",
"dev-claims": " echo RUN dev-claims && pnpm svelte:predev && cross-env SW_DEV=true DEBUG=vite-plugin-pwa:* SW=true CLAIMS=true vite dev --port 3000",
"dev-destroy": " echo RUN dev-destroy && pnpm svelte:predev && cross-env SW_DEV=true DEBUG=vite-plugin-pwa:* SW_DESTROY=true vite dev --port 3000",
"dev-claims-destroy": " echo RUN dev-claims-destroy && pnpm svelte:predev && cross-env SW_DEV=true DEBUG=vite-plugin-pwa:* SW=true SW_DESTROY=true CLAIMS=true vite dev --port 3000",
Expand Down Expand Up @@ -43,22 +43,23 @@
"tauri:dev": " echo RUN tauri:dev && tauri dev",
"tauri:build": "echo RUN tauri:build && tauri build",
"tauri": "echo RUN tauri && tauri",
"test": "echo RUN test && cross-env NO_HTTPS=1 playwright test",
"test:debug": "echo RUN test:debug && cross-env NO_HTTPS=1 playwright test --headed --timeout=0",
"test": "pnpm run test:integration && pnpm run test:unit",
"test:integration": "echo RUN test:integration && cross-env NO_HTTPS=1 playwright test",
"test:integration:debug": "echo RUN test:integration:debug && cross-env NO_HTTPS=1 playwright test --headed --timeout=0",
"check": "echo RUN check && svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": " echo RUN check:watch && svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"test:unit": "echo RUN test:unit && vitest run",
"test:unit:watch": "echo RUN test:unit:watch && vitest",
"test:unit:coverage": "echo RUN test:unit:coverage && vitest run --coverage",
"lint": "prettier --plugin-search-dir . --check . && eslint .",
"lint:css": "stylelint \"src/**/*.{css,html,svelte}\"",
"format": "echo RUN format && pnpm lint:css --fix && prettier --plugin-search-dir . --write .",
"storybook": " echo RUN storybook(:dev) && cross-env NODE_OPTIONS=--openssl-legacy-provider storybook dev -p 6006",
"storybook:dev": " pnpm storybook",
"storybook:build": "echo RUN storybook:build && cross-env NODE_OPTIONS=--openssl-legacy-provider storybook build",
"android:open": "cap open android",
"android:dev": "cap run android",
"all": "pnpm i && pnpm format && pnpm lint && pnpm tauri info && pnpm build:only-sw && pnpm tauri:build && pnpm storybook:build && pnpm test:unit && pnpm test && pnpm check",
"lint": "prettier --check . && eslint .",
"lint:css": "stylelint \"src/**/*.{css,html,svelte}\"",
"format": "echo RUN format && pnpm lint:css --fix && prettier --write .",
"storybook": " echo RUN storybook(:dev) && cross-env NODE_OPTIONS=--openssl-legacy-provider storybook dev -p 6006",
"storybook:dev": " pnpm storybook",
"storybook:build": "echo RUN storybook:build && cross-env NODE_OPTIONS=--openssl-legacy-provider storybook build",
"android:open": "cap open android",
"android:dev": "cap run android",
"all": "pnpm i && pnpm format && pnpm lint && pnpm tauri info && pnpm build:only-sw && pnpm tauri:build && pnpm storybook:build && pnpm test:unit && pnpm test:integration && pnpm check",
"chromatic": "npx chromatic --build-script-name=storybook:build",
"icons:build": "bash -c \"./scripts/icon-generator.sh .logo/logo.svg .logo/icon.svg .logo/icon_bg.svg .logo/icon+texture.svg \""
},
Expand All @@ -80,7 +81,7 @@
"@mdx-js/react": "^2.1.5",
"@neoconfetti/svelte": "^1.0.0",
"@playwright/test": "^1.28.1",
"@rollup/plugin-replace": "^5.0.1",
"@rollup/plugin-replace": "^5.0.5",
"@ronilaukkarinen/stylelint-a11y": "^1.2.4",
"@storybook/addon-a11y": "7.0.0-beta.17",
"@storybook/addon-actions": "7.0.0-beta.17",
Expand Down Expand Up @@ -118,44 +119,44 @@
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"@tauri-apps/api": "^1.2.0",
"@tauri-apps/cli": "^1.2.1",
"@types/cookie": "^0.5.1",
"@types/glob": "^8.0.0",
"@types/minimist": "^1.2.2",
"@types/node": "^18.11.9",
"@types/object-hash": "^3.0.1",
"@types/eslint": "8.56.0",
"@types/glob": "^8.1.0",
"@types/minimist": "^1.2.5",
"@types/node": "^20.10.6",
"@types/object-hash": "^3.0.6",
"@types/react": "17.0.0",
"@types/workbox-build": "^5.0.1",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@vite-pwa/sveltekit": "^0.1.0",
"@vitejs/plugin-basic-ssl": "^1.0.1",
"@vitest/coverage-c8": "^0.25.3",
"@vitejs/plugin-basic-ssl": "^1.0.2",
"@vitest/coverage-v8": "^1.1.1",
"autoprefixer": "^10.4.13",
"babel-loader": "^8.3.0",
"chromatic": "^6.11.4",
"cpy": "^9.0.1",
"cpy": "^11.0.0",
"cross-env": "^7.0.3",
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0",
"eslint-import-resolver-typescript": "^3.5.2",
"eslint-plugin-import": "^2.26.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-storybook": "^0.6.8",
"eslint-plugin-svelte3": "^4.0.0",
"glob": "^8.0.3",
"minimist": "^1.2.7",
"eslint-plugin-svelte": "next",
"glob": "^10.3.10",
"minimist": "^1.2.8",
"object-hash": "^3.0.0",
"pnpm": "^8.14.0",
"postcss": "^8.4.20",
"postcss-cli": "^10.0.0",
"postcss-html": "^1.5.0",
"postcss-import": "^15.0.0",
"postcss-nesting": "^10.2.0",
"prettier": "^2.8.0",
"prettier-plugin-svelte": "^2.10.1",
"prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.1.2",
"react": "17.0.0",
"react-dom": "17.0.0",
"rimraf": "^3.0.2",
"sass": "^1.56.1",
"rimraf": "^5.0.5",
"sass": "^1.69.7",
"shx": "^0.3.4",
"storybook": "7.0.0-beta.17",
"storybook-addon-themes": "^6.1.0",
Expand All @@ -164,17 +165,17 @@
"stylelint-config-prettier": "^9.0.4",
"stylelint-config-recommended": "^9.0.0",
"stylelint-config-standard": "^29.0.0",
"svelte": "^4.0.0",
"svelte-check": "^3.4.3",
"svelte": "^5.0.0-next.1",
"svelte-check": "^3.6.0",
"svgo": "^3.0.2",
"ts-node": "^10.9.1",
"ts-node": "^10.9.2",
"tslib": "^2.4.1",
"tsx": "^4.7.0",
"typescript": "^5.0.0",
"vanilla-lazyload": "^17.8.3",
"vite": "^5.0.0",
"vanilla-lazyload": "^17.8.5",
"vite": "^5.0.3",
"vite-plugin-pwa": "^0.14.0",
"vite-plugin-static-copy": "^0.13.0",
"vite-plugin-static-copy": "^1.0.0",
"vitest": "^1.0.0",
"webpack": "^5.73.0",
"workbox-build": "^6.5.4",
Expand All @@ -194,10 +195,5 @@
},
"type": "module",
"readme": "README.md",
"_id": "svelte-blank-20221125@0.0.1",
"pnpm": {
"patchedDependencies": {
"eslint-plugin-svelte3@4.0.0": "patches/eslint-plugin-svelte3@4.0.0.patch"
}
}
}
"_id": "svelte-blank-20221125@0.0.1"
}
3 changes: 2 additions & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const config: PlaywrightTestConfig = {
port: 4173,
timeout: 120 * 1000
},
testDir: 'tests'
testDir: 'tests',
testMatch: /(.+\.)?(test|spec)\.[jt]s/
// TODO: (when needed) How to use Vite config? see https://github.com/microsoft/playwright/issues/14295#issuecomment-1132258917
// use: {
// ctViteConfig: { }
Expand Down
Loading

0 comments on commit 58d145a

Please sign in to comment.