Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NO-ISSUE] Enable live reload of pages upon server restart #579

Merged
merged 2 commits into from
Sep 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions assets/js/app.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import './htmx.js';
import 'htmx-ext-sse';

import Alpine from "alpinejs";
window.Alpine = Alpine;
Alpine.start();
42 changes: 0 additions & 42 deletions assets/js/autoreload.js

This file was deleted.

2 changes: 2 additions & 0 deletions assets/js/htmx.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import htmx from "htmx.org";
window.htmx = htmx;
4 changes: 4 additions & 0 deletions assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
"esbuild": "^0.13.13",
"esbuild-copy-static-files": "^0.1.0",
"esbuild-plugin-assets-manifest": "^1.0.7",
"esbuild-sass-plugin": "^3.3.1",
"esbuild-style-plugin": "^1.6.0",
"htmx-ext-sse": "^2.2.2",
"htmx.org": "^2.0.2",
"livereload-js": "^4.0.2",
"postcss": "^8.4.31",
"postcss-cli": "^9.0.2",
"postcss-copy": "^7.1.0",
Expand Down
3,686 changes: 1,953 additions & 1,733 deletions assets/yarn.lock

Large diffs are not rendered by default.

23 changes: 8 additions & 15 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ tests: True
allow-newer: type-errors-pretty:base
, souffle-haskell:text
, servant-lucid:text
, lucid-svg:text
, lucid-svg:transformers
, lucid-aria:text
, lucid-alpine:text
, hashable:filepath
, qrcode-juicypixels:text
, qrcode-core:text

allow-older: pg-entity:time

Expand All @@ -33,28 +31,23 @@ source-repository-package
type: git
location: https://github.com/scrive/tracing
tag: 9c2baa1
subdir:
subdir:
.
./tracing-effectful

source-repository-package
type: git
location: https://github.com/haskell-cryptography/libsodium-bindings
tag: 6bc69bf
subdir:
tag: b11a72bc20990ba81bf4875c372f719fb2da24fc
subdir:
./sel
./libsodium-bindings

source-repository-package
type: git
location: https://gitlab.com/dpwiz/raven-haskell.git/
tag: 180088b26fb79515627644545955aed5c50d804a
tag: 37434cb1b2515a9aa74a0544da9716bfbabea7ca
subdir: ./raven-haskell

source-repository-package
type: git
location: https://github.com/supki/envparse
tag: 503a699

source-repository-package
type: git
Expand All @@ -74,12 +67,12 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/saurabhnanda/odd-jobs
tag: 411d5d0
tag: a159d7a

source-repository-package
type: git
location: https://github.com/haskell-cryptography/one-time-password
tag: 2ca2313
tag: 66d5422a32ef7e5dc085b40b63e8630b916f9a74

source-repository-package
type: git
Expand Down
48 changes: 26 additions & 22 deletions cabal.project.freeze
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
constraints: any.Cabal ==3.10.3.0,
any.Cabal-syntax ==3.10.3.0,
any.Cabal-syntax ==3.10.3.0 || ==3.14.0.0,
any.HUnit ==1.6.2.0,
any.JuicyPixels ==3.3.9,
JuicyPixels -mmap,
Expand All @@ -20,6 +20,7 @@ constraints: any.Cabal ==3.10.3.0,
aeson +ordered-keymap,
any.aeson-pretty ==0.8.10,
aeson-pretty -lib-only,
any.alex ==3.5.1.0,
any.ansi-terminal ==1.1.1,
ansi-terminal -example,
any.ansi-terminal-types ==1.1,
Expand Down Expand Up @@ -67,8 +68,6 @@ constraints: any.Cabal ==3.10.3.0,
byteslice +avoid-rawmemchr,
any.bytesmith ==0.3.11.1,
any.bytestring ==0.11.5.3,
any.bytestring-builder ==0.10.8.2.0,
bytestring-builder +bytestring_has_builder,
any.cabal-doctest ==1.0.10,
any.call-stack ==0.4.0,
any.case-insensitive ==1.2.1.0,
Expand All @@ -91,7 +90,7 @@ constraints: any.Cabal ==3.10.3.0,
any.comonad ==5.0.8,
comonad +containers +distributive +indexed-traversable,
any.concurrent-output ==1.10.21,
any.conduit ==1.3.5,
any.conduit ==1.3.6,
any.conduit-extra ==1.3.6,
any.constraints ==0.14.2,
any.containers ==0.6.7,
Expand All @@ -116,6 +115,7 @@ constraints: any.Cabal ==3.10.3.0,
any.cryptonite ==0.30,
cryptonite -check_alignment +integer-gmp -old_toolchain_inliner +support_aesni +support_deepseq -support_pclmuldq +support_rdrand -support_sse +use_target_attributes,
any.cryptonite-conduit ==0.2.2,
any.dani-servant-lucid2 ==0.1.0.0,
any.data-default ==0.7.1.1,
any.data-default-class ==0.1.2.0,
any.data-default-instances-containers ==0.0.1,
Expand All @@ -137,7 +137,7 @@ constraints: any.Cabal ==3.10.3.0,
any.emojis ==0.1.4.1,
any.entropy ==0.4.1.10,
entropy -donotgetentropy,
any.envparse ==0.5.0,
any.envparse ==0.6.0,
any.erf ==2.0.0.0,
any.exceptions ==0.10.7,
any.extensible-exceptions ==0.1.1.4,
Expand All @@ -160,15 +160,16 @@ constraints: any.Cabal ==3.10.3.0,
any.ghci ==9.6.6,
any.haddock-library ==1.11.0,
any.half ==0.3.1,
any.happy ==1.20.1.1,
any.happy ==2.0.2,
any.happy-lib ==2.0.2,
any.hashable ==1.4.7.0,
hashable -arch-native +integer-gmp -random-initial-seed,
any.haskell-lexer ==1.1.1,
any.haskell-src-exts ==1.23.1,
any.haskell-src-meta ==0.8.14,
any.hdaemonize ==0.5.7,
any.heaps ==0.4,
any.hedgehog ==1.4,
any.hedgehog ==1.5,
any.hostname ==1.0,
any.hourglass ==0.2.12,
any.hpc ==0.6.2.0,
Expand All @@ -180,12 +181,14 @@ constraints: any.Cabal ==3.10.3.0,
any.hspec-expectations ==0.8.4,
any.hsyslog ==5.0.2,
hsyslog -install-examples,
any.htmx ==0.1.0.2,
any.htmx-lucid ==0.2.0.1,
any.http-api-data ==0.6.1,
http-api-data -use-text-show,
any.http-client ==0.7.17,
http-client +network-uri,
any.http-client-tls ==0.3.6.3,
any.http-conduit ==2.3.8.3,
any.http-conduit ==2.3.9,
http-conduit +aeson,
any.http-date ==0.0.11,
any.http-media ==0.8.1.1,
Expand All @@ -207,15 +210,14 @@ constraints: any.Cabal ==3.10.3.0,
any.lens ==5.3.2,
lens -benchmark-uniplate -dump-splices +inlining -j +test-hunit +test-properties +test-templates +trustworthy,
any.libsodium-bindings ==0.0.1.1,
libsodium-bindings -homebrew-libsodium -use-pkg-config,
libsodium-bindings -homebrew -pkg-config,
any.lifted-async ==0.10.2.5,
any.lifted-base ==0.2.3.12,
any.lockfree-queue ==0.2.4,
any.log-base ==0.12.0.1,
any.log-effectful ==1.0.0.0,
any.lucid ==2.11.20230408,
any.lucid-alpine ==0.1.0.7,
any.lucid-svg ==0.7.2.0,
any.lucid2 ==0.0.20240424,
any.megaparsec ==9.6.1,
megaparsec -dev,
any.memory ==0.18.0,
Expand All @@ -232,7 +234,7 @@ constraints: any.Cabal ==3.10.3.0,
monad-loops +base4,
any.monad-time ==0.4.0.0,
any.monad-time-effectful ==1.0.0.0,
any.mono-traversable ==1.0.17.0,
any.mono-traversable ==1.0.20.0,
any.mtl ==2.3.1,
any.mtl-compat ==0.2.2,
mtl-compat -two-point-one -two-point-two,
Expand All @@ -256,7 +258,7 @@ constraints: any.Cabal ==3.10.3.0,
optparse-applicative +process,
any.os-string ==2.0.6,
any.parallel ==3.2.2.0,
any.parsec ==3.1.16.1,
any.parsec ==3.1.16.1 || ==3.1.17.0,
any.parser-combinators ==1.3.0,
parser-combinators -dev,
any.pcre2 ==2.2.1,
Expand All @@ -266,10 +268,11 @@ constraints: any.Cabal ==3.10.3.0,
any.pg-transact ==0.3.2.0,
any.pg-transact-effectful ==0.0.1.0,
any.poolboy ==0.2.2.0,
any.postgresql-libpq ==0.9.5.0,
any.postgresql-libpq ==0.11.0.0,
postgresql-libpq -use-pkg-config,
any.postgresql-libpq-configure ==0.11,
any.postgresql-migration ==0.2.1.8,
any.postgresql-simple ==0.6.5.1,
any.postgresql-simple ==0.7.0.0,
any.pretty ==1.1.3.6,
any.pretty-show ==1.10,
any.prettyprinter ==1.7.1,
Expand Down Expand Up @@ -311,14 +314,14 @@ constraints: any.Cabal ==3.10.3.0,
semigroups +binary +bytestring -bytestring-builder +containers +deepseq +hashable +tagged +template-haskell +text +transformers +unordered-containers,
any.serialise ==0.2.6.1,
serialise +newtime15,
any.servant ==0.20.1,
any.servant ==0.20.2,
any.servant-blaze ==0.9.1,
any.servant-client ==0.20,
any.servant-client-core ==0.20,
any.servant-client ==0.20.2,
any.servant-client-core ==0.20.2,
any.servant-effectful ==0.0.1.0,
any.servant-lucid ==0.9.0.6,
any.servant-openapi3 ==2.0.1.6,
any.servant-server ==0.20,
any.servant-server ==0.20.2,
any.servant-static-th ==1.0.0.0,
servant-static-th -buildexample,
any.simple-sendfile ==0.2.32,
Expand Down Expand Up @@ -354,7 +357,8 @@ constraints: any.Cabal ==3.10.3.0,
any.tasty-hunit ==0.10.2,
any.temporary ==1.3,
any.terminal-size ==0.3.4,
any.text ==2.0.2,
any.text ==2.0.2 || ==2.1.1,
text -developer -pure-haskell +simdutf,
any.text-conversions ==0.3.1.1,
any.text-display ==0.0.5.2,
text-display -book,
Expand Down Expand Up @@ -385,7 +389,7 @@ constraints: any.Cabal ==3.10.3.0,
any.transformers-compat ==0.7.2,
transformers-compat -five +five-three -four +generic-deriving +mtl -three -two,
any.tuples ==0.1.0.0,
any.typed-process ==0.2.11.1,
any.typed-process ==0.2.12.0,
any.typed-process-effectful ==1.0.0.2,
any.unicode-data ==0.6.0,
unicode-data -dev-has-icu,
Expand Down Expand Up @@ -417,7 +421,7 @@ constraints: any.Cabal ==3.10.3.0,
any.wai-extra ==3.1.15,
wai-extra -build-example,
any.wai-log ==0.4.0.1,
any.wai-logger ==2.4.0,
any.wai-logger ==2.4.1,
any.wai-middleware-heartbeat ==0.0.1.0,
any.warp ==3.3.31,
warp +allow-sendfilefd -network-bytestring -warp-debug -x509,
Expand Down
2 changes: 2 additions & 0 deletions changelog.d/579
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
synopsis: Add htmx polling for page reload
prs: #579
Loading
Loading