mirror of
https://github.com/numtide/treefmt.git
synced 2024-10-03 20:18:11 +03:00
doc: fix docs package build
Vitepress cli does some funky stuff with the tty. Signed-off-by: Brian McGee <brian@bmcgee.ie>
This commit is contained in:
parent
95c6cdbd57
commit
311e46a409
5
docs/package-lock.json
generated
5
docs/package-lock.json
generated
@ -1,9 +1,12 @@
|
||||
{
|
||||
"name": "docs",
|
||||
"name": "Treefmt Docs",
|
||||
"version": "0.0.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "Treefmt Docs",
|
||||
"version": "0.0.1",
|
||||
"devDependencies": {
|
||||
"vitepress": "^1.1.4"
|
||||
}
|
||||
|
@ -1,11 +1,13 @@
|
||||
{
|
||||
"name": "treefmt-docs",
|
||||
"version": "0.0.1",
|
||||
"devDependencies": {
|
||||
"vitepress": "^1.1.4"
|
||||
},
|
||||
"scripts": {
|
||||
"vitepress": "vitepress",
|
||||
"docs:dev": "vitepress dev",
|
||||
"docs:build": "vitepress build",
|
||||
"docs:preview": "vitepress preview"
|
||||
"dev": "vitepress dev",
|
||||
"build": "vitepress build",
|
||||
"preview": "vitepress preview"
|
||||
}
|
||||
}
|
||||
|
13
nix/docs.nix
13
nix/docs.nix
@ -9,9 +9,12 @@ _: {
|
||||
inherit (self'.packages.default) version;
|
||||
|
||||
src = ../docs;
|
||||
npmDepsHash = "sha256-acT9uaUhvxyM/S3hv1M9h5h2H5EpzrNbaxCYmzYn100=";
|
||||
npmDepsHash = "sha256-J9qTWueOcSBq7qRec6YdTuWI2VlVQ0q6AynDLovf6s0=";
|
||||
|
||||
npmBuildScript = "docs:build";
|
||||
# we have to use a custom build phase because vitepress is doing something funky with the ttty
|
||||
buildPhase = ''
|
||||
cat | npm run build 2>&1 | cat
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
@ -32,19 +35,19 @@ _: {
|
||||
inherit category;
|
||||
name = "docs:dev";
|
||||
help = "serve docs for local development";
|
||||
command = "cd $PRJ_ROOT/docs && npm run docs:dev";
|
||||
command = "cd $PRJ_ROOT/docs && npm dev";
|
||||
}
|
||||
{
|
||||
inherit category;
|
||||
name = "docs:build";
|
||||
help = "create a production build of docs";
|
||||
command = "cd $PRJ_ROOT/docs && npm run docs:build";
|
||||
command = "cd $PRJ_ROOT/docs && npm build";
|
||||
}
|
||||
{
|
||||
inherit category;
|
||||
name = "docs:preview";
|
||||
help = "preview a production build of docs";
|
||||
command = "cd $PRJ_ROOT/docs && npm run docs:preview";
|
||||
command = "cd $PRJ_ROOT/docs && npm preview";
|
||||
}
|
||||
{
|
||||
inherit category;
|
||||
|
Loading…
Reference in New Issue
Block a user