Skip to content

Commit

Permalink
docs(libraries/template): create template documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
JowiAoun committed Oct 1, 2024
1 parent 262e3ce commit 2e5d82e
Showing 1 changed file with 101 additions and 0 deletions.
101 changes: 101 additions & 0 deletions apps/docs/src/content/docs/libraries/template.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
---
title: template
description: Template documentation page for creating new libraries.
---

## 📦 Overview

### What it does

Provide a clear, concise overview of the purpose and capabilities of the library.

### Key Features

Highlight the main features of the library in bullet points or brief descriptions.

### How to use

#### Basic Usage Example

Show a minimal example of how to set up and use the library.

---

## 📖 API Reference

### `myAction` Function

- **Description**:
- **Parameters**:
- **Return Type**:

### `myThing` Object

- **Properties**
- `FirstProperty`:

### Error Handling

Explain how errors are thrown during validation and show example outputs for invalid variables.

---

## 🛠️ Commands

### View all commands

To view all commands from the library's `project.json`, `package.json` and inheritted:
```sh title="Terminal"
pnpm nx show project <lib>
```

### Focus library usage

To view/focus on all the apps & libraries which use this library:
```sh title="Terminal"
pnpm nx graph --focus <lib>
```

---

## 📝 Contributing

### Best Practices

#### Code Formatting

Include instructions or links to code style guides, like Prettier/ESLint.

The library should be linted without any errors:
```sh title="Terminal"
pnpm nx run <lib>:lint
```

#### Testing

To run tests for this library:
```sh title="Terminal"
pnpm nx run <lib>:test
```

---

## ❓ FAQs

### What happens if ...?

Provide an answer along with an example error message.

### Can I add ...?

Show an example of adding more to the library.

---

## 🛑 Troubleshooting

### Common Errors

#### Invalidity

Describe a common invalidity issue and how to fix it, along with an example error output.

0 comments on commit 2e5d82e

Please sign in to comment.