nix-config/modules/scripts/preview.nix
Oliver Davies 88e8de8c30 Add preview script
An opinionated wrapper around Browsersync.
2025-08-18 18:34:36 +01:00

24 lines
528 B
Nix

{
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
'';
})
];
};
}