port docs #31
@ -3,6 +3,7 @@
|
||||
"vitepress": "^1.1.4"
|
||||
},
|
||||
"scripts": {
|
||||
"vitepress": "vitepress",
|
||||
"docs:dev": "vitepress dev",
|
||||
"docs:build": "vitepress build",
|
||||
"docs:preview": "vitepress preview"
|
||||
|
18
nix/docs.nix
18
nix/docs.nix
@ -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";
|
||||
|
Reference in New Issue
Block a user