Skip to content

Commit

Permalink
Fix "docs" Makefile target: Restore searchable docs
Browse files Browse the repository at this point in the history
errfrom committed Nov 30, 2024
1 parent 4b08083 commit 529ef04
Showing 2 changed files with 7 additions and 23 deletions.
17 changes: 6 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -6,13 +6,6 @@ purs-args := "--stash --censor-lib --censor-codes=ImplicitImport,ImplicitQualifi
example-docker := example/minimal/docker/cluster/docker-compose.yaml
example-keys := example/minimal/docker/cluster/keys/

system := $(shell uname -s)
ifeq (${system},Linux)
open-in-browser := xdg-open
else
open-in-browser := open
endif

requires-nix-shell:
@[ "$(IN_NIX_SHELL)" ] || \
( echo "The '$(MAKECMDGOALS)' target must be run from inside a nix shell, run 'nix develop' first." \
@@ -30,11 +23,13 @@ format: requires-nix-shell
repl: requires-nix-shell
spago repl

docs:
nix build .#docs
${open-in-browser} result/generated-docs/html/index.html
docs: requires-nix-shell
mv package.json package.json.old
jq 'del(.type)' package.json.old > package.json
spago docs --open
mv -f package.json.old package.json

build-example:
build-example: requires-nix-shell
cd example/minimal && \
spago build --purs-args ${purs-args}

13 changes: 1 addition & 12 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -56,6 +56,7 @@
packageLockOnly = true;
packages = with pkgs; [
fd
jq
hydra.packages.${system}.hydra-node
nixpkgs-fmt
nodePackages.prettier
@@ -76,18 +77,6 @@
}
);

packages = perSystem (system:
let
pkgs = nixpkgsFor system;
project = psProjectFor system pkgs;
in
{
docs = project.buildPursDocs {
packageName = projectName;
};
}
);

apps = perSystem (system:
let
pkgs = nixpkgsFor system;

0 comments on commit 529ef04

Please sign in to comment.