Conversation
|
@srid I've got an error when I try to run |
nix/cargo-doc-live_test.nix
Outdated
| { pkgs, ... }: { | ||
| services.cargo-doc-live."cargo-doc-live1" = { | ||
| enable = true; | ||
| crateName = "simple"; |
There was a problem hiding this comment.
But there's no crate named simple in this PR? This is probably why the PR is failing.
|
Also, the CI never terminates after those |
079ba71 to
3695662
Compare
srid
left a comment
There was a problem hiding this comment.
You also want to add the new example to nixci configuration of the top-level flake.nix so it builds in the CI.
There was a problem hiding this comment.
Could you add a ./example/cargo-doc-live/README.md that explains how to run it?
example/cargo-doc-live/flake.nix
Outdated
| # `process-compose.foo` will add a flake package output called "foo". | ||
| # Therefore, this will add a default package that you can build using | ||
| # `nix build` and run using `nix run`. | ||
| process-compose."default" = { ... }: |
There was a problem hiding this comment.
| process-compose."default" = { ... }: | |
| process-compose."cargo-doc-live" = { ... }: |
(The default package is usually the Rust package itself)
nix/cargo-doc-live.nix
Outdated
|
|
||
| src = lib.mkOption { | ||
| type = types.path; | ||
| description = "The src of the cargo"; |
nix/cargo-doc-live.nix
Outdated
|
|
||
| src = lib.mkOption { | ||
| type = types.path; | ||
| description = "The src of the cargo"; |
There was a problem hiding this comment.
| description = "The src of the cargo"; | |
| description = "Path to the cargo project root"; |
nix/cargo-doc-live.nix
Outdated
| default = { | ||
| processes = | ||
| { |
There was a problem hiding this comment.
The { in line 34 is indented inconsistently with the rest of the project (e.g.: see { in line 32). You should fix this in similar other places as well.
nix/cargo-doc-live.nix
Outdated
| let | ||
| browser-sync = lib.getExe pkgs.nodePackages.browser-sync; | ||
| cargo-watch = lib.getExe pkgs.cargo-watch; | ||
| cargo = lib.getExe pkgs.cargo; | ||
| in |
There was a problem hiding this comment.
Since these are in runtimeInputs already, we don't need these and can just reference the executables as is in the script text, no?
nix/cargo-doc-live.nix
Outdated
| runtimeInputs = with pkgs; [ nodePackages.browser-sync ]; | ||
| text = | ||
| '' | ||
| ${lib.getExe pkgs.nodePackages.browser-sync} start --port ${toString config.port} --ss target/doc -s target/doc \ |
There was a problem hiding this comment.
| ${lib.getExe pkgs.nodePackages.browser-sync} start --port ${toString config.port} --ss target/doc -s target/doc \ | |
| browser-sync start --port ${toString config.port} --ss target/doc -s target/doc \ |
doc/cargo-doc-live.md
Outdated
| @@ -0,0 +1,40 @@ | |||
| # cargo-doc-live | |||
|
|
|||
| [cargo-doc-live] is live server version of `cargo doc`. | |||
There was a problem hiding this comment.
Could you use the 1st paragraph and video from https://github.com/srid/cargo-doc-live in here?
doc/cargo-doc-live.md
Outdated
|
|
||
| {#crateName} | ||
|
|
||
| ### The crate to use when opening docs in browser |
There was a problem hiding this comment.
I know our docs elsewhere are more of skeleton, but we should get into the practice of fleshing out when writing new docs. Can you add some paragraphs to all these sections?
#217