Add preview script

An opinionated wrapper around Browsersync.
This commit is contained in:
Oliver Davies 2025-08-18 18:34:36 +01:00
parent 2ef0d0015f
commit 88e8de8c30

View file

@ -0,0 +1,24 @@
{
flake.modules.homeManager.base =
{ pkgs, ... }:
{
home.packages = [
(pkgs.writeShellApplication {
name = "preview";
runtimeInputs = with pkgs.nodePackages; [ browser-sync ];
text = ''
# Based on https://github.com/rwxrob/dot/blob/main/scripts/preview.
browser-sync start \
--ignore '**/.*' \
--no-notify \
--no-open \
--no-ui \
-sw
'';
})
];
};
}