Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docs): initial mdbook setup and hookup to oranda (#205)
- Loading branch information
Showing
17 changed files
with
442 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
book |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[book] | ||
authors = ["Kat Marchán"] | ||
language = "en" | ||
multilingual = false | ||
src = "src" | ||
title = "Orogene" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Summary | ||
|
||
[Introduction](./introduction.md) | ||
|
||
--- | ||
|
||
# User Guide | ||
|
||
- [Configuration](./guide/configuration.md) | ||
|
||
--- | ||
|
||
# Commands | ||
|
||
- [ping](./commands/ping.md) | ||
- [restore](./commands/restore.md) | ||
- [view](./commands/view.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{#include ../../../tests/snapshots/help__ping.snap:8:}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{#include ../../../tests/snapshots/help__restore.snap:8:}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{#include ../../../tests/snapshots/help__view.snap:8:}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Configuration | ||
|
||
Orogene currently uses toml files for (persistent) configuration. Soon, this | ||
will be replaced with a [kdl](https://kdl.dev)-based configs. | ||
|
||
Until then, this page will stay mostly blank. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Introduction | ||
|
||
Orogene is a package manager for building up and writing `node_modules/` | ||
directories, as well as a general toolkit for working with related packages | ||
and APIs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
{ | ||
"additional_pages": ["./CHANGELOG.md", "./CONTRIBUTING.md"], | ||
"md_book": "./book/book" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
use std::process::{Command, Output, Stdio}; | ||
|
||
static BIN: &str = env!("CARGO_BIN_EXE_oro"); | ||
|
||
#[test] | ||
fn ping_markdown() { | ||
insta::assert_snapshot!("ping", sub_md("ping")); | ||
} | ||
|
||
#[test] | ||
fn restore_markdown() { | ||
insta::assert_snapshot!("restore", sub_md("restore")); | ||
} | ||
|
||
#[test] | ||
fn view_markdown() { | ||
insta::assert_snapshot!("view", sub_md("view")); | ||
} | ||
|
||
fn sub_md(subcmd: &str) -> String { | ||
let output = Command::new(BIN) | ||
.arg("help-markdown") | ||
.arg(subcmd) | ||
.stdout(Stdio::piped()) | ||
.stderr(Stdio::piped()) | ||
.output() | ||
.expect("Failed to execute process"); | ||
|
||
assert!(output.status.success(), "{}", format_output(&output)); | ||
format_output(&output) | ||
} | ||
|
||
fn format_output(output: &Output) -> String { | ||
let stdout = std::str::from_utf8(&output.stdout).unwrap(); | ||
let stderr = std::str::from_utf8(&output.stderr).unwrap(); | ||
format!("stderr:\n{stderr}\nstdout:\n{stdout}") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
--- | ||
source: tests/help.rs | ||
expression: "sub_md(\"ping\")" | ||
--- | ||
stderr: | ||
|
||
stdout: | ||
# oro ping | ||
|
||
Ping the registry | ||
|
||
### Usage: | ||
|
||
``` | ||
oro ping [OPTIONS] | ||
``` | ||
|
||
### Options | ||
|
||
#### `-h, --help` | ||
|
||
Print help (see a summary with '-h') | ||
|
||
#### `-V, --version` | ||
|
||
Print version | ||
|
||
### Global Options | ||
|
||
#### `--root <ROOT>` | ||
Package path to operate on | ||
#### `--registry <REGISTRY>` | ||
Registry used for unscoped packages. | ||
Defaults to https://registry.npmjs.org. | ||
#### `--cache <CACHE>` | ||
Location of disk cache. | ||
Default location varies by platform. | ||
#### `--config <CONFIG>` | ||
File to read configuration values from. | ||
When specified, global configuration loading is disabled and configuration values will only be read from this location. | ||
#### `--loglevel <LOGLEVEL>` | ||
Log output level/directive. | ||
Supports plain loglevels (off, error, warn, info, debug, trace) as well as more advanced directives in the format `target[span{field=value}]=level`. | ||
#### `-q, --quiet` | ||
Disable all output | ||
#### `--json` | ||
Format output as JSON | ||
#### `--no-progress` | ||
Disable progress bar display | ||
Oops, something went wrong.