using svelte format for stories requires storybook to run with the
--index-json flag but this breaks the storage location of DOM
snapshots
the configuration files in this commit fixes this and also moves them
to the same location as the image snapshots
7777e06a added a dependancy on playwright which wouldn't run in
nix-shell without extra configuration.
the simpliest configuration (used in this commit) required a more
recent version of nixpkgs unstable. unfortunately these more recent
versions introduce a 'system limit for file watchers reached' bug in
storybook's server when run on linux. This can be mitigated by
manually increasing the watcher limit.
attempts to fix the playwright nixpkgs dependancies to different
versions still introduced the bug
hopefully the bug will disapear in newer releases of nixpkgs unstable
add image and dom snapshot comparison for storybook components
image snapshot comparison can been flaky and produce many
false-positives. a higher threshold has been used to mitigate this
although it may not identify all regressions. DOM snapshots
supplement images to increase the likelihood of capturing
regressions.
consideration was given to using a shared library built in rust
for this and the cli utility but this was discounted for these
reasons:
1. different data storage and caching requirements
2. ndk is more mature and has extra features for building web
apps
3. use of shared svelte components in ndk
4. prospect of contributing git specific components to ndk to
encourage adoption among other clientus
gitlint provides an excellent standard ruleset for conventional
commits
the commit-msg shell script is default produced by gitlint
Consideration was given to using a tool such as pre-commit-hooks to
produce git hooks but ultimately using shell scripts reduces
dependancies and simplifies producing a determinaistic development
enviornment with nix.
start with a nix boilerplate for svelte that supports reproducible
builds
taken unedited from https://github.com/knarkzel/sveltekit-nix
c444859e97fb13393ad6e295132412bbea044e32