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