Skip to content

Commit

Permalink
Merge pull request #93 from reubenmiller/dev-use-corepack
Browse files Browse the repository at this point in the history
dev: Use corepack to manage yarn version
  • Loading branch information
reubenmiller authored Dec 9, 2024
2 parents c7392cb + 057959b commit 8d8855a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
28 changes: 22 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Check out the [online documentation](https://thin-edge.github.io/thin-edge.io) t

## Running docs in development

**Pre-requisites**

* [Node.js](https://nodejs.org/en) >= 20.x

The instructions below detail how to build and serve the documentation.

1. Clone the project and change directory to the project
Expand All @@ -19,28 +23,40 @@ The instructions below detail how to build and serve the documentation.
cd tedge-docs
```

2. Checkout the thin-edge.io source markdown files
2. Enable Node.js corepack

```sh
corepack enable
```

If corepack is not installed, then you will have to install it using the following:

```sh
npm install -g corepack
```

3. Checkout the thin-edge.io source markdown files

```sh
just init
# Optional (if you want to include the last official docs as well)
just checkout-version
just checkout-version "<tag>"
```

You can also checkout a fork instead (rather than the main project)by providing the git url of the fork as the first positional argument.
You can also checkout a fork instead (rather than the main project) by providing the git url of the fork as the first positional argument.

```sh
just project=https://github.com/myuser/thin-edge.io.git init
```

3. Start the documentation (using a local dev server)
4. Start the documentation (using a local dev server)

```sh
just docs
```

Alternatively you can start the doc
Alternatively you can start the docs

```sh
just docs-container
Expand All @@ -50,7 +66,7 @@ The instructions below detail how to build and serve the documentation.

* The thin-edge.io repo be cloned automatically in a sibling folder (on the same level as the `tedge-docs` project)

4. You can now edit the thin-edge.io documents under the `docs/src` folder of the `thin-edge.io` repository. Any changes will be detected and the browser page will be refreshed automatically.
5. You can now edit the thin-edge.io documents under the `docs/src` folder of the `thin-edge.io` repository. Any changes will be detected and the browser page will be refreshed automatically.

## Checkout a branch and treat it as a specific version

Expand Down
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ init:

# Checkout docs from the last official release
#
# Note: The versioned docs are not commited to the project
# Note: The versioned docs are not committed to the project
# they are only copied during build time. This is to reduce the 'noise'
# in the commit history.
# See the docs for more info: https://docusaurus.io/docs/versioning
Expand Down

0 comments on commit 8d8855a

Please sign in to comment.