diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..9a1ee8b --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,70 @@ +name: Deploy to GitHub Pages + +on: + # Trigger the workflow every time you push to the `main` branch + # Using a different branch name? Replace `main` with your branch’s name + push: + branches: [master] + + # Allows you to run this workflow manually from the Actions tab on GitHub. + workflow_dispatch: + +# Allow this job to clone the repo and create a page deployment +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install pnpm + uses: pnpm/action-setup@v3 + with: + version: 9 + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Setup Pages + uses: actions/configure-pages@v3 + with: + static_site_generator: sveltekit + + - name: Build + run: pnpm run build + + - name: Upload Artifacts + uses: actions/upload-pages-artifact@v1 + with: + # this should match the `pages` option in your adapter-static options + path: 'build/' + + deploy: + needs: build + runs-on: ubuntu-latest + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Deploy + id: deployment + uses: actions/deploy-pages@v1 \ No newline at end of file diff --git a/README.md b/README.md index 722471a..61bd4e8 100644 --- a/README.md +++ b/README.md @@ -75,4 +75,4 @@ The component raises events to indicate when any transition is running: ## TailwindUI -If you're converting from TailwindUI markup, you can use this [handy converter](https://kuba1meow.github.io/svelte-transition-converter/) to convert the comments into `` markup and classes. +If you're converting from TailwindUI markup, you can use this [handy converter](https://captaincodeman.github.io/svelte-transition/) to convert the comments into `` markup and classes. diff --git a/package.json b/package.json index f7bfccf..69f47c7 100644 --- a/package.json +++ b/package.json @@ -43,10 +43,11 @@ "check:watch": "svelte-check --tsconfig ./tsconfig.json --watch" }, "devDependencies": { - "@sveltejs/adapter-auto": "^3.2.0", + "@sveltejs/adapter-static": "^3.0.2", "@sveltejs/kit": "^2.5.7", "@sveltejs/package": "^2.3.1", "@sveltejs/vite-plugin-svelte": "^3.1.0", + "@tailwindcss/forms": "^0.5.7", "autoprefixer": "^10.4.19", "postcss": "^8.4.38", "publint": "^0.2.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a07dc7a..71f3a05 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,9 +8,9 @@ importers: .: devDependencies: - '@sveltejs/adapter-auto': - specifier: ^3.2.0 - version: 3.2.0(@sveltejs/kit@2.5.7(@sveltejs/vite-plugin-svelte@3.1.0(svelte@4.2.16)(vite@5.2.11))(svelte@4.2.16)(vite@5.2.11)) + '@sveltejs/adapter-static': + specifier: ^3.0.2 + version: 3.0.2(@sveltejs/kit@2.5.7(@sveltejs/vite-plugin-svelte@3.1.0(svelte@4.2.16)(vite@5.2.11))(svelte@4.2.16)(vite@5.2.11)) '@sveltejs/kit': specifier: ^2.5.7 version: 2.5.7(@sveltejs/vite-plugin-svelte@3.1.0(svelte@4.2.16)(vite@5.2.11))(svelte@4.2.16)(vite@5.2.11) @@ -20,6 +20,9 @@ importers: '@sveltejs/vite-plugin-svelte': specifier: ^3.1.0 version: 3.1.0(svelte@4.2.16)(vite@5.2.11) + '@tailwindcss/forms': + specifier: ^0.5.7 + version: 0.5.7(tailwindcss@3.4.3) autoprefixer: specifier: ^10.4.19 version: 10.4.19(postcss@8.4.38) @@ -317,8 +320,8 @@ packages: cpu: [x64] os: [win32] - '@sveltejs/adapter-auto@3.2.0': - resolution: {integrity: sha512-She5nKT47kwHE18v9NMe6pbJcvULr82u0V3yZ0ej3n1laWKGgkgdEABE9/ak5iDPs93LqsBkuIo51kkwCLBjJA==} + '@sveltejs/adapter-static@3.0.2': + resolution: {integrity: sha512-/EBFydZDwfwFfFEuF1vzUseBoRziwKP7AoHAwv+Ot3M084sE/HTVBHf9mCmXfdM9ijprY5YEugZjleflncX5fQ==} peerDependencies: '@sveltejs/kit': ^2.0.0 @@ -353,6 +356,11 @@ packages: svelte: ^4.0.0 || ^5.0.0-next.0 vite: ^5.0.0 + '@tailwindcss/forms@0.5.7': + resolution: {integrity: sha512-QE7X69iQI+ZXwldE+rzasvbJiyV/ju1FGHH0Qn2W3FKbuYtqp8LKcy6iSw79fVUT5/Vvf+0XgLCeYVG+UV6hOw==} + peerDependencies: + tailwindcss: '>=3.0.0 || >= 3.0.0-alpha.1' + '@types/cookie@0.6.0': resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} @@ -706,6 +714,10 @@ packages: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} + mini-svg-data-uri@1.4.4: + resolution: {integrity: sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg==} + hasBin: true + minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} @@ -1304,10 +1316,9 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.17.2': optional: true - '@sveltejs/adapter-auto@3.2.0(@sveltejs/kit@2.5.7(@sveltejs/vite-plugin-svelte@3.1.0(svelte@4.2.16)(vite@5.2.11))(svelte@4.2.16)(vite@5.2.11))': + '@sveltejs/adapter-static@3.0.2(@sveltejs/kit@2.5.7(@sveltejs/vite-plugin-svelte@3.1.0(svelte@4.2.16)(vite@5.2.11))(svelte@4.2.16)(vite@5.2.11))': dependencies: '@sveltejs/kit': 2.5.7(@sveltejs/vite-plugin-svelte@3.1.0(svelte@4.2.16)(vite@5.2.11))(svelte@4.2.16)(vite@5.2.11) - import-meta-resolve: 4.1.0 '@sveltejs/kit@2.5.7(@sveltejs/vite-plugin-svelte@3.1.0(svelte@4.2.16)(vite@5.2.11))(svelte@4.2.16)(vite@5.2.11)': dependencies: @@ -1361,6 +1372,11 @@ snapshots: transitivePeerDependencies: - supports-color + '@tailwindcss/forms@0.5.7(tailwindcss@3.4.3)': + dependencies: + mini-svg-data-uri: 1.4.4 + tailwindcss: 3.4.3 + '@types/cookie@0.6.0': {} '@types/estree@1.0.5': {} @@ -1703,6 +1719,8 @@ snapshots: min-indent@1.0.1: {} + mini-svg-data-uri@1.4.4: {} + minimatch@3.1.2: dependencies: brace-expansion: 1.1.11 diff --git a/src/routes/+layout.ts b/src/routes/+layout.ts new file mode 100644 index 0000000..05d87e2 --- /dev/null +++ b/src/routes/+layout.ts @@ -0,0 +1 @@ +export const prerender = true \ No newline at end of file diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 382e01a..dbe8f36 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,42 +1,55 @@ -
-
- -
-
+
+

Svelte-Transition

+

A Svelte component to transition elements via CSS classes

+

+ Examples: + Basic + Nested +

+

Convert TailwindUI Comments

+ +
+ +
+ +
- -
+ {#if groups} +
+ +
+
{result}
+
+
+ {/if} + \ No newline at end of file diff --git a/src/routes/examples/basic/+page.svelte b/src/routes/examples/basic/+page.svelte new file mode 100644 index 0000000..382e01a --- /dev/null +++ b/src/routes/examples/basic/+page.svelte @@ -0,0 +1,42 @@ + + +
+
+ +
+
+
+ +
diff --git a/src/routes/nested/+page.svelte b/src/routes/examples/nested/+page.svelte similarity index 100% rename from src/routes/nested/+page.svelte rename to src/routes/examples/nested/+page.svelte diff --git a/svelte.config.js b/svelte.config.js index f489167..89c6e28 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -1,4 +1,4 @@ -import adapter from "@sveltejs/adapter-auto" +import adapter from '@sveltejs/adapter-static' import { vitePreprocess } from '@sveltejs/vite-plugin-svelte' /** @type {import('@sveltejs/kit').Config} */ @@ -12,4 +12,4 @@ const config = { }, } -export default config; +export default config diff --git a/tailwind.config.cjs b/tailwind.config.cjs index ec34afe..afaaba3 100644 --- a/tailwind.config.cjs +++ b/tailwind.config.cjs @@ -1,11 +1,11 @@ const config = { - content: ["./src/**/*.{html,js,svelte,ts}"], + content: ['./src/**/*.{html,js,svelte,ts}'], - theme: { - extend: {}, - }, + theme: { + extend: {}, + }, - plugins: [], -}; + plugins: [require('@tailwindcss/forms')], +} module.exports = config;