Skip to content

Commit

Permalink
wip: add focs package
Browse files Browse the repository at this point in the history
Signed-off-by: Brian McGee <brian@bmcgee.ie>
  • Loading branch information
brianmcgee committed May 2, 2024
1 parent 894f90f commit 7cc49e2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"vitepress": "^1.1.4"
},
"scripts": {
"vitepress": "vitepress",
"docs:dev": "vitepress dev",
"docs:build": "vitepress build",
"docs:preview": "vitepress preview"
Expand Down
18 changes: 17 additions & 1 deletion nix/docs.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
_: {
perSystem = {pkgs, ...}: {
perSystem = {pkgs, self', ...}: {
packages.docs = pkgs.buildNpmPackage {
pname = "treefmt-docs";
inherit (self'.packages.default) version;

src = ../docs;
npmDepsHash = "sha256-acT9uaUhvxyM/S3hv1M9h5h2H5EpzrNbaxCYmzYn100=";

npmBuildScript = "docs:build";

installPhase = ''
runHook preInstall
cp -rv .vitepress/dist/ $out
runHook postInstall
'';
};

devshells.default = {
commands = let
category = "docs";
Expand Down

0 comments on commit 7cc49e2

Please sign in to comment.