From e49e3433ed5113e1cb28c2070a254de5c93202e3 Mon Sep 17 00:00:00 2001 From: Nikita Galaiko Date: Tue, 7 Mar 2023 11:52:18 +0100 Subject: [PATCH] setup prettier-plugin-tailwindcss --- package.json | 1 + pnpm-lock.yaml | 88 +++++++++++++++---- src/app.html | 2 +- src/lib/components/BackForwardButtons.svelte | 8 +- src/lib/components/Breadcrumbs.svelte | 16 ++-- .../components/CodeViewer/CodeViewer.svelte | 2 +- src/lib/components/Login.svelte | 4 +- src/lib/components/Popover/Popover.svelte | 2 +- .../timeline/TimelineDaySession.svelte | 14 +-- .../TimelineDaySessionActivities.svelte | 14 +-- src/lib/components/week/WeekBlockEntry.svelte | 2 +- src/routes/+error.svelte | 2 +- src/routes/+layout.svelte | 8 +- src/routes/+page.svelte | 46 +++++----- .../projects/[projectId]/+layout.svelte | 16 ++-- src/routes/projects/[projectId]/+page.svelte | 8 +- .../projects/[projectId]/search/+page.svelte | 2 +- .../[projectId]/settings/+page.svelte | 30 +++---- .../[projectId]/timeline/+page.svelte | 62 ++++++------- src/routes/users/+page.svelte | 36 ++++---- 20 files changed, 211 insertions(+), 152 deletions(-) diff --git a/package.json b/package.json index d4d562414..eaed0f907 100644 --- a/package.json +++ b/package.json @@ -65,6 +65,7 @@ "postcss-load-config": "^4.0.1", "prettier": "^2.8.0", "prettier-plugin-svelte": "^2.8.1", + "prettier-plugin-tailwindcss": "^0.2.4", "svelte": "^3.55.1", "svelte-check": "^3.0.1", "tailwindcss": "^3.1.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a786f280c..97f4b4bc5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -48,6 +48,7 @@ specifiers: posthog-js: ^1.46.1 prettier: ^2.8.0 prettier-plugin-svelte: ^2.8.1 + prettier-plugin-tailwindcss: ^0.2.4 seti-icons: ^0.0.4 svelte: ^3.55.1 svelte-check: ^3.0.1 @@ -62,7 +63,7 @@ dependencies: '@codemirror/autocomplete': 6.4.2_yom6siklgbeshd7shgtg2sdiku '@codemirror/commands': 6.2.0 '@codemirror/lang-angular': github.com/codemirror/lang-angular/ee6151b55668b2941c71b0d1db9f5a526ef29710 - '@codemirror/lang-css': github.com/codemirror/lang-css/9f5b41703dff289d94731c5caba72cf3b57fff43_nzpoxphwgc7witc3f5hdaoweju + '@codemirror/lang-css': github.com/codemirror/lang-css/2cde46bf378ae36413e7fca5e24a2606f3cdf840_nzpoxphwgc7witc3f5hdaoweju '@codemirror/lang-html': github.com/codemirror/lang-html/0420487e1ac04bfd59129c243e3b7b802ffca30c '@codemirror/lang-java': github.com/codemirror/lang-java/834c534e7d689b0d88c15e3af55b0ee551d985d2 '@codemirror/lang-javascript': 6.1.4 @@ -82,7 +83,7 @@ dependencies: '@lezer/lr': 1.3.3 '@nextjournal/lang-clojure': 1.0.0 '@replit/codemirror-lang-csharp': 6.1.0_dbd6aqsmfpystthdbxnrle4dwe - '@replit/codemirror-lang-svelte': 6.0.0_zlhskyhbzw2pn2yfpaeuivpmfu + '@replit/codemirror-lang-svelte': 6.0.0_yycrqtt34ynecrgehdjoffcaie '@square/svelte-store': 1.0.14 '@tabler/icons-svelte': 2.6.0_svelte@3.55.1 '@tauri-apps/api': 1.2.0 @@ -94,7 +95,7 @@ dependencies: posthog-js: 1.46.1 seti-icons: 0.0.4 svelte-french-toast: 1.0.3_svelte@3.55.1 - tauri-plugin-log-api: github.com/tauri-apps/tauri-plugin-log/921afb3366b14ac43e3d8041a7def4b85d4d7192 + tauri-plugin-log-api: github.com/tauri-apps/tauri-plugin-log/05a9bfd9edb9b5f4ab95412bb607691708b65a25 devDependencies: '@sveltejs/adapter-static': 1.0.0-next.50_l5ueyfihz3gpzzvvyo2ean5u3e @@ -111,6 +112,7 @@ devDependencies: postcss-load-config: 4.0.1_postcss@8.4.21 prettier: 2.8.4 prettier-plugin-svelte: 2.9.0_jrsxveqmsx2uadbqiuq74wlc4u + prettier-plugin-tailwindcss: 0.2.4_yjdjpc7im5hvpskij45owfsns4 svelte: 3.55.1 svelte-check: 3.0.3_gqx7lw3sljhsd4bstor5m2aa2u tailwindcss: 3.2.4_postcss@8.4.21 @@ -143,8 +145,8 @@ packages: '@lezer/common': 1.0.2 dev: false - /@codemirror/lang-css/6.0.2_nzpoxphwgc7witc3f5hdaoweju: - resolution: {integrity: sha512-4V4zmUOl2Glx0GWw0HiO1oGD4zvMlIQ3zx5hXOE6ipCjhohig2bhWRAasrZylH9pRNTcl1VMa59Lsl8lZWlTzw==} + /@codemirror/lang-css/6.1.0_nzpoxphwgc7witc3f5hdaoweju: + resolution: {integrity: sha512-GYn4TyMvQLrkrhdisFh8HCTDAjPY/9pzwN12hG9UdrTUxRUMicF+8GS24sFEYaleaG1KZClIFLCj0Rol/WO24w==} dependencies: '@codemirror/autocomplete': 6.4.2_yom6siklgbeshd7shgtg2sdiku '@codemirror/language': 6.6.0 @@ -159,7 +161,7 @@ packages: resolution: {integrity: sha512-bqCBASkteKySwtIbiV/WCtGnn/khLRbbiV5TE+d9S9eQJD7BA4c5dTRm2b3bVmSpilff5EYxvB4PQaZzM/7cNw==} dependencies: '@codemirror/autocomplete': 6.4.2_yom6siklgbeshd7shgtg2sdiku - '@codemirror/lang-css': 6.0.2_nzpoxphwgc7witc3f5hdaoweju + '@codemirror/lang-css': 6.1.0_nzpoxphwgc7witc3f5hdaoweju '@codemirror/lang-javascript': 6.1.4 '@codemirror/language': 6.6.0 '@codemirror/state': 6.2.0 @@ -608,7 +610,7 @@ packages: '@lezer/lr': 1.3.3 dev: false - /@replit/codemirror-lang-svelte/6.0.0_zlhskyhbzw2pn2yfpaeuivpmfu: + /@replit/codemirror-lang-svelte/6.0.0_yycrqtt34ynecrgehdjoffcaie: resolution: {integrity: sha512-U2OqqgMM6jKelL0GNWbAmqlu1S078zZNoBqlJBW+retTc5M4Mha6/Y2cf4SVg6ddgloJvmcSpt4hHrVoM4ePRA==} peerDependencies: '@codemirror/autocomplete': ^6.0.0 @@ -624,7 +626,7 @@ packages: '@lezer/lr': ^1.0.0 dependencies: '@codemirror/autocomplete': 6.4.2_yom6siklgbeshd7shgtg2sdiku - '@codemirror/lang-css': github.com/codemirror/lang-css/9f5b41703dff289d94731c5caba72cf3b57fff43_nzpoxphwgc7witc3f5hdaoweju + '@codemirror/lang-css': github.com/codemirror/lang-css/2cde46bf378ae36413e7fca5e24a2606f3cdf840_nzpoxphwgc7witc3f5hdaoweju '@codemirror/lang-html': github.com/codemirror/lang-html/0420487e1ac04bfd59129c243e3b7b802ffca30c '@codemirror/lang-javascript': 6.1.4 '@codemirror/language': 6.6.0 @@ -2505,6 +2507,62 @@ packages: svelte: 3.55.1 dev: true + /prettier-plugin-tailwindcss/0.2.4_yjdjpc7im5hvpskij45owfsns4: + resolution: {integrity: sha512-wMyugRI2yD8gqmMpZSS8kTA0gGeKozX/R+w8iWE+yiCZL09zY0SvfiHfHabNhjGhzxlQ2S2VuTxPE3T72vppCQ==} + engines: {node: '>=12.17.0'} + peerDependencies: + '@ianvs/prettier-plugin-sort-imports': '*' + '@prettier/plugin-php': '*' + '@prettier/plugin-pug': '*' + '@shopify/prettier-plugin-liquid': '*' + '@shufo/prettier-plugin-blade': '*' + '@trivago/prettier-plugin-sort-imports': '*' + prettier: '>=2.2.0' + prettier-plugin-astro: '*' + prettier-plugin-css-order: '*' + prettier-plugin-import-sort: '*' + prettier-plugin-jsdoc: '*' + prettier-plugin-organize-attributes: '*' + prettier-plugin-organize-imports: '*' + prettier-plugin-style-order: '*' + prettier-plugin-svelte: '*' + prettier-plugin-twig-melody: '*' + peerDependenciesMeta: + '@ianvs/prettier-plugin-sort-imports': + optional: true + '@prettier/plugin-php': + optional: true + '@prettier/plugin-pug': + optional: true + '@shopify/prettier-plugin-liquid': + optional: true + '@shufo/prettier-plugin-blade': + optional: true + '@trivago/prettier-plugin-sort-imports': + optional: true + prettier-plugin-astro: + optional: true + prettier-plugin-css-order: + optional: true + prettier-plugin-import-sort: + optional: true + prettier-plugin-jsdoc: + optional: true + prettier-plugin-organize-attributes: + optional: true + prettier-plugin-organize-imports: + optional: true + prettier-plugin-style-order: + optional: true + prettier-plugin-svelte: + optional: true + prettier-plugin-twig-melody: + optional: true + dependencies: + prettier: 2.8.4 + prettier-plugin-svelte: 2.9.0_jrsxveqmsx2uadbqiuq74wlc4u + dev: true + /prettier/2.8.4: resolution: {integrity: sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==} engines: {node: '>=10.13.0'} @@ -3192,11 +3250,11 @@ packages: '@lezer/highlight': 1.1.3 dev: false - github.com/codemirror/lang-css/9f5b41703dff289d94731c5caba72cf3b57fff43_nzpoxphwgc7witc3f5hdaoweju: - resolution: {tarball: https://codeload.github.com/codemirror/lang-css/tar.gz/9f5b41703dff289d94731c5caba72cf3b57fff43} - id: github.com/codemirror/lang-css/9f5b41703dff289d94731c5caba72cf3b57fff43 + github.com/codemirror/lang-css/2cde46bf378ae36413e7fca5e24a2606f3cdf840_nzpoxphwgc7witc3f5hdaoweju: + resolution: {tarball: https://codeload.github.com/codemirror/lang-css/tar.gz/2cde46bf378ae36413e7fca5e24a2606f3cdf840} + id: github.com/codemirror/lang-css/2cde46bf378ae36413e7fca5e24a2606f3cdf840 name: '@codemirror/lang-css' - version: 6.0.2 + version: 6.1.0 prepare: true requiresBuild: true dependencies: @@ -3217,7 +3275,7 @@ packages: requiresBuild: true dependencies: '@codemirror/autocomplete': 6.4.2_yom6siklgbeshd7shgtg2sdiku - '@codemirror/lang-css': 6.0.2_nzpoxphwgc7witc3f5hdaoweju + '@codemirror/lang-css': 6.1.0_nzpoxphwgc7witc3f5hdaoweju '@codemirror/lang-javascript': 6.1.4 '@codemirror/language': 6.6.0 '@codemirror/state': 6.2.0 @@ -3321,8 +3379,8 @@ packages: '@lezer/lr': 1.3.3 dev: false - github.com/tauri-apps/tauri-plugin-log/921afb3366b14ac43e3d8041a7def4b85d4d7192: - resolution: {tarball: https://codeload.github.com/tauri-apps/tauri-plugin-log/tar.gz/921afb3366b14ac43e3d8041a7def4b85d4d7192} + github.com/tauri-apps/tauri-plugin-log/05a9bfd9edb9b5f4ab95412bb607691708b65a25: + resolution: {tarball: https://codeload.github.com/tauri-apps/tauri-plugin-log/tar.gz/05a9bfd9edb9b5f4ab95412bb607691708b65a25} name: tauri-plugin-log-api version: 0.0.0 dependencies: diff --git a/src/app.html b/src/app.html index 7709a6d49..e1211dd6f 100644 --- a/src/app.html +++ b/src/app.html @@ -6,7 +6,7 @@ %sveltekit.head% - +
%sveltekit.body%
diff --git a/src/lib/components/BackForwardButtons.svelte b/src/lib/components/BackForwardButtons.svelte index 25f4eb902..aa3b89505 100644 --- a/src/lib/components/BackForwardButtons.svelte +++ b/src/lib/components/BackForwardButtons.svelte @@ -5,11 +5,11 @@
{:else if $token !== null} @@ -40,7 +40,7 @@

{:else} {/if} diff --git a/src/lib/components/Popover/Popover.svelte b/src/lib/components/Popover/Popover.svelte index 7ce2a6ad6..c9e23cf02 100644 --- a/src/lib/components/Popover/Popover.svelte +++ b/src/lib/components/Popover/Popover.svelte @@ -66,7 +66,7 @@ in:fadeAndZoomIn={{ duration: 150 }} out:fade={{ duration: 100 }} on:mouseup={() => (showPopover = false)} - class="wrapper z-[999] bg-zinc-800 border border-zinc-700 text-zinc-50 rounded shadow-2xl min-w-[180px] max-w-[512px]" + class="wrapper z-[999] min-w-[180px] max-w-[512px] rounded border border-zinc-700 bg-zinc-800 text-zinc-50 shadow-2xl" style="--popover-top: {`${bottom}px`}; --popover-left: {`${left}px`}" > diff --git a/src/lib/components/timeline/TimelineDaySession.svelte b/src/lib/components/timeline/TimelineDaySession.svelte index 22991d87b..6f385ed9b 100644 --- a/src/lib/components/timeline/TimelineDaySession.svelte +++ b/src/lib/components/timeline/TimelineDaySession.svelte @@ -53,7 +53,7 @@ {#if !session.hash} - + {/if} @@ -91,11 +91,11 @@
{#await list({ projectId: projectId, sessionId: session.id }) then deltas} {#each Object.keys(deltas) as delta} -
-
+
+
{@html pathToIconSvg(delta)}
-
+
{pathToName(delta)}
diff --git a/src/lib/components/timeline/TimelineDaySessionActivities.svelte b/src/lib/components/timeline/TimelineDaySessionActivities.svelte index 5d3215e6a..6025fbc84 100644 --- a/src/lib/components/timeline/TimelineDaySessionActivities.svelte +++ b/src/lib/components/timeline/TimelineDaySessionActivities.svelte @@ -25,26 +25,26 @@
-
+
{#each activities as activity}
{#if activity.type.startsWith('commit')} - + {:else if activity.type.startsWith('merge')} - + {:else if activity.type.startsWith('rebase')} - + {:else if activity.type.startsWith('push')} - + {/if}
diff --git a/src/lib/components/week/WeekBlockEntry.svelte b/src/lib/components/week/WeekBlockEntry.svelte index 2f0fbdb45..92cb3fffc 100644 --- a/src/lib/components/week/WeekBlockEntry.svelte +++ b/src/lib/components/week/WeekBlockEntry.svelte @@ -38,7 +38,7 @@

{toHumanBranchName(label)} diff --git a/src/routes/+error.svelte b/src/routes/+error.svelte index ed6c90552..1572e9747 100644 --- a/src/routes/+error.svelte +++ b/src/routes/+error.svelte @@ -15,7 +15,7 @@ : 'Something went wrong'; -

+

{message} :(

diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 6b0f3e5bf..4853e5071 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -18,20 +18,20 @@ user.subscribe(posthog.identify); -
+
- + {#if $user} {#if $user.picture} - Avatar + Avatar {/if} {$user.name} {:else} diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 614d3e328..ae3f6a2bb 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -24,15 +24,15 @@ }; -
-
+
+
{#if $projects.length == 0} -
+
-
-
+
+
Welcome to GitButler.
-
More than just version control.
+
More than just version control.
GitButler is a tool to help you manage all the local work you do on your code projects. @@ -41,7 +41,7 @@ Think of us as a code concierge, a smart assistant for all the coding related tasks you need to do every day.
-