Skip to content

Commit

Permalink
Update website to Vitepress 1.0.0-rc.40 etc. (#1079)
Browse files Browse the repository at this point in the history
Signed-off-by: Marek Kaput <[email protected]>
  • Loading branch information
mkaput authored Jan 22, 2024
1 parent c531a6e commit 4248f46
Show file tree
Hide file tree
Showing 9 changed files with 376 additions and 894 deletions.
12 changes: 12 additions & 0 deletions website/.vitepress/theme/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,25 @@
--vp-c-brand-2: var(--swm-c-navy-60);
--vp-c-brand-3: var(--swm-c-navy-100);
--vp-c-brand-soft: var(--swm-c-navy-20);

--vp-c-tip-1: var(--swm-c-blue-120);
--vp-c-tip-2: var(--swm-c-blue-140);
--vp-c-tip-3: black;
--vp-c-tip-soft: var(--swm-c-blue-20);
--vp-custom-block-tip-code-bg: var(--swm-c-blue-40);
}

.dark {
--vp-c-brand-1: var(--swm-c-navy-60);
--vp-c-brand-2: var(--swm-c-navy-40);
--vp-c-brand-3: var(--swm-c-navy-80);
--vp-c-brand-soft: var(--swm-c-navy-120);

--vp-c-tip-1: var(--swm-c-blue-40);
--vp-c-tip-2: var(--swm-c-blue-60);
--vp-c-tip-3: var(--swm-c-blue-80);
--vp-c-tip-soft: var(--swm-c-blue-140);
--vp-custom-block-tip-code-bg: var(--swm-c-blue-120);
}

:root {
Expand Down
54 changes: 24 additions & 30 deletions website/docs/cheatsheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ Get started with Scarb by following a cheatsheet of the most important commands.
scarb new project/directory
```

::: info
There is `scarb init` which runs in current directory instead of creating new one.
:::
> [!TIP]
> There is `scarb init` which runs in current directory instead of creating new one.
## Compiling

Expand All @@ -24,9 +23,9 @@ scarb build

Built Sierra code of this package will be written to `target/dev` directory.

::: info
`scarb clean` cleans `target` directory.
:::
<!-- prettier-ignore -->
> [!TIP]
> `scarb clean` cleans `target` directory.
### Building CASM

Expand Down Expand Up @@ -72,21 +71,17 @@ Add dependency located in local path:
alexandria_math = { path = "../path-to-alexandria-checkout/alexandria" }
```

::: info
You can add `version` field to specify package version requirement.
:::
> [!TIP]
> You can add `version` field to specify package version requirement.
::: info
You can add `branch`, `tag` and `rev` fields to Git dependencies.
:::
> [!TIP]
> You can add `branch`, `tag` and `rev` fields to Git dependencies.
::: info
You can use `ssh://` URLs, Scarb uses local `git` installation for all network operations.
:::
> [!TIP]
> You can use `ssh://` URLs, Scarb uses local `git` installation for all network operations.
::: info
You can add development dependencies in `[dev-dependencies]` section.
:::
> [!TIP]
> You can add development dependencies in `[dev-dependencies]` section.
### Via `scarb add`

Expand All @@ -102,21 +97,20 @@ Add dependency located in local path:
scarb add alexandria_math --path ../path-to-alexandria-checkout/alexandria
```

::: info
You can specify package version like this: `[email protected]`, but see remarks in previous section.
:::
> [!TIP]
> You can specify package version like this: `[email protected]`, but see remarks in previous section.
::: info
`--git` supports `--branch`, `--tag` and `--rev` arguments.
:::
<!-- prettier-ignore -->
> [!TIP]
> `--git` supports `--branch`, `--tag` and `--rev` arguments.
::: info
`scarb rm` removes a dependency.
:::
<!-- prettier-ignore -->
> [!TIP]
> `scarb rm` removes a dependency.
::: info
`--dev` flag adds/removes a development dependency.
:::
<!-- prettier-ignore -->
> [!TIP]
> `--dev` flag adds/removes a development dependency.
## Formatting

Expand Down
7 changes: 3 additions & 4 deletions website/docs/extensions/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ From integration tests, you can only reference the main package by package name
The integration tests can be either a single module with a `lib.cairo` file in `tests` directory,
or multiple files with `cairo` extension, each defining a separate test module.

::: info
Note: For now, the compilation of integration tests with `lib.cairo` file in the `tests` directory will be faster than
compilation of integration tests defined in separate files.
:::
> [!NOTE]
> For now, the compilation of integration tests with `lib.cairo` file in the `tests` directory will be faster than
> compilation of integration tests defined in separate files.
## Using third-party test runners

Expand Down
7 changes: 3 additions & 4 deletions website/docs/guides/creating-a-new-package.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ import {data as constants} from "../../constants.data";

# Creating a New Package

::: info
At any time, you can review projects hosted in
[example directory](https://github.com/software-mansion/scarb/tree/main/examples) from Scarb repository.
:::
> [!TIP]
> At any time, you can review projects hosted in
> [example directory](https://github.com/software-mansion/scarb/tree/main/examples) from Scarb repository.
To start a new package with Scarb, use `scarb new`:

Expand Down
7 changes: 3 additions & 4 deletions website/docs/guides/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
Scarb manages dependencies by cloning packages from their Git repositories.
To add a dependency, simply declare it in your `Scarb.toml`.

::: info
Using Git repositories as a foundation for package management is not an ideal
approach. Therefore, we plan to create a proper package registry in long term.
:::
> [!NOTE]
> Using Git repositories as a foundation for package management is not an ideal
> approach. Therefore, we plan to create a proper package registry in long term.
## Adding a dependency

Expand Down
7 changes: 3 additions & 4 deletions website/docs/reference/lockfile.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ Lockfiles contain exact specifications of all packages from full tree of depende
dependencies etc.).
Scarb lockfiles can easily be reviewed by the user.

::: info
Lockfiles should be committed to version control system (e.g. a Git repository),
allowing for full tracking of concrete version changes.
:::
> [!IMPORTANT]
> Lockfiles should be committed to version control system (e.g. a Git repository),
> allowing for full tracking of concrete version changes.
## Lockfile format

Expand Down
21 changes: 9 additions & 12 deletions website/docs/writing-extensions/scarb-crate.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
# Using Scarb as a library <Badge type="warning" text="deprecated" />

::: warning
Scarb crate is scheduled for deprecation in unspecified future.
It is advised not to use it in new projects.
> [!WARNING]
> Scarb crate is scheduled for deprecation in unspecified future.
> It is advised not to use it in new projects.
>
> The combination of calling scarb command with the `--json` flag, and the `scarb metadata` command should cover all use
> cases for communicating with Scarb from outside world.
The combination of calling scarb command with the `--json` flag, and the `scarb metadata` command should cover all use
cases for communicating with Scarb from outside world.

:::

::: warning
Scarb is not being published to crates.io anymore.
Use Scarb via Git reference in your `Cargo.toml`.
:::
> [!WARNING]
> Scarb is not being published to crates.io anymore.
> Use Scarb via Git reference in your `Cargo.toml`.
Scarb is a [Rust](https://rust-lang.org) crate which can be used as a regular library in Rust applications.
We publish each release of Scarb to [crates.io](https://crates.io), the official package registry for Rust.
Expand Down
Loading

0 comments on commit 4248f46

Please sign in to comment.