Add preview
script
An opinionated wrapper around Browsersync.
This commit is contained in:
parent
2ef0d0015f
commit
88e8de8c30
1 changed files with 24 additions and 0 deletions
24
modules/scripts/preview.nix
Normal file
24
modules/scripts/preview.nix
Normal 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
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue