-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
14de1eb
commit 1c91700
Showing
1 changed file
with
109 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
# Prerequisites | ||
|
||
- Rust 1.77 (or newer) | ||
- NodeJS 20 (or newer) with pnpm 9 (or newer) | ||
- Ruby 3.3 (or newer) | ||
|
||
You should be able to install these however you want. If you are | ||
looking for suggestions applicable to macOS... | ||
|
||
- Rust via [rustup][] | ||
- NodeJS via [Homebrew][] | ||
- pnpm via [Homebrew][] | ||
- Ruby via [RVM][] | ||
|
||
[rustup]: https://rustup.rs | ||
[Homebrew]: https://brew.sh | ||
[RVM]: https://rvm.io | ||
|
||
# Building | ||
|
||
CSS and JS assets are bundled with the release binary in order to | ||
create the crate list HTML page. These assets are not normally checked | ||
into the repository and need to be built by the developer: | ||
|
||
``` | ||
% cargo xtask assets --watch | ||
``` | ||
|
||
Once this is running in one window, a normal build via Cargo will suffice: | ||
|
||
``` | ||
% cargo build | ||
``` | ||
|
||
# Tests | ||
|
||
## Registry conformance | ||
|
||
This ensures that the files created by Margo function as a valid Cargo | ||
registry. It drives Margo and Cargo as command line tools, much | ||
like a user would. | ||
|
||
These tests are written in Rust and live in the `conformance` directory. To run them: | ||
|
||
``` | ||
% cd conformance | ||
% cargo run | ||
``` | ||
|
||
## UI | ||
|
||
This ensures that the HTML output generated by Margo is usable and | ||
useful. It drives Margo and Cargo as command line tools, much like a | ||
user would. | ||
|
||
These tests are written in Ruby and live in the `integration-tests` directory. | ||
|
||
``` | ||
% cd integration-tests | ||
% bundle exec rspec | ||
``` | ||
|
||
# Linting / Formatting | ||
|
||
A number of tools are checked in CI. | ||
|
||
## Rust | ||
|
||
- [Rustfmt][] | ||
- [Clippy][] | ||
|
||
``` | ||
% cargo fmt | ||
% cargo clippy | ||
``` | ||
|
||
[Rustfmt]: https://github.com/rust-lang/rustfmt | ||
[Clippy]: https://doc.rust-lang.org/clippy/ | ||
|
||
## TS / CSS / Markdown / YAML | ||
|
||
- [TypeScript][] | ||
|
||
``` | ||
% pnpm check | ||
``` | ||
|
||
[TypeScript]: https://www.typescriptlang.org | ||
|
||
## Ruby | ||
|
||
- [RuboCop][] | ||
|
||
``` | ||
% cd integration-tests | ||
% bundle exec rubocop | ||
``` | ||
|
||
[RuboCop]: https://github.com/rubocop/rubocop | ||
|
||
## CSS / Markdown / YAML | ||
|
||
- [Prettier][] | ||
|
||
``` | ||
% pnpm fmt | ||
``` | ||
|
||
[prettier]: https://prettier.io |