updated docs

This commit is contained in:
2026-08-04 19:37:23 +02:00
parent 9a45b3a50f
commit 90cbc4370f
19 changed files with 290 additions and 272 deletions
+51 -11
View File
@@ -33,14 +33,29 @@ theirs, and don't put it in any file that ends up in a repository.
### Store the token in your environment
Don't paste the token straight into project files. Keep it in an environment
variable, so your install config carries no secret.
variable, so your install config carries no secret. How you set it depends on
your system:
**macOS** (default shell is zsh):
```bash
# add to ~/.zshrc (or ~/.bashrc)
export GITEA_TOKEN=paste_your_token_here
echo 'export GITEA_TOKEN=paste_your_token_here' >> ~/.zshrc
source ~/.zshrc
```
Reload your shell (`source ~/.zshrc`) or open a new terminal window.
**Linux / Ubuntu** (default shell is bash):
```bash
echo 'export GITEA_TOKEN=paste_your_token_here' >> ~/.bashrc
source ~/.bashrc
```
**Windows (PowerShell)** — set it permanently for your user, then open a new
terminal so it takes effect:
```powershell
setx GITEA_TOKEN "paste_your_token_here"
```
> On Windows, `setx` writes the variable but does **not** affect the current
> window — close it and open a new PowerShell for the token to be visible.
---
@@ -55,16 +70,40 @@ specific, unreleased commit straight from the repository.
The plugin is published to the package registry in Gitea. You pull a ready-built
package and build nothing locally.
**1. Configure the registry.** Create an `.npmrc` file in your project directory
(or add these two lines to `~/.npmrc` to make it work globally):
**1. Configure the registry.** Add these two lines to an `.npmrc` file:
```
@intecion:registry=https://git.intecion.net/api/packages/IntecionSoftware/npm/
//git.intecion.net/api/packages/IntecionSoftware/npm/:_authToken=${GITEA_TOKEN}
```
Because the token lives in the `${GITEA_TOKEN}` variable, this file holds no
secret — you can safely commit it.
You can put this file **in the project directory** (applies to that project) or
**globally** (applies everywhere). The global location differs by system:
| System | Global `.npmrc` path |
|---|---|
| macOS | `~/.npmrc` (i.e. `/Users/you/.npmrc`) |
| Linux / Ubuntu | `~/.npmrc` (i.e. `/home/you/.npmrc`) |
| Windows | `%USERPROFILE%\.npmrc` (i.e. `C:\Users\you\.npmrc`) |
Fastest way to create the global file:
```bash
# macOS / Linux
npm config set @intecion:registry https://git.intecion.net/api/packages/IntecionSoftware/npm/
```
```powershell
# Windows (PowerShell) — same command, npm handles the path
npm config set @intecion:registry https://git.intecion.net/api/packages/IntecionSoftware/npm/
```
Then add the auth line manually (npm config doesn't set tokens with variables).
Because the token lives in the `${GITEA_TOKEN}` variable, the file holds no
secret — you can safely commit a project-level `.npmrc`.
> **Windows note:** the `${GITEA_TOKEN}` syntax in `.npmrc` is expanded by npm/pnpm
> itself, not by the shell — so it works the same on Windows as on macOS/Linux,
> as long as you set the variable with `setx` (see above).
**2. Install:**
@@ -141,7 +180,7 @@ nobody gets stuck on a stale one from the cache.
Everything lives in the **[docs/](./docs)** directory. To get started:
- **[getting-started.md](./docs/getting-started.md)** — project setup, step by step
- **[install.md](./docs/install.md)** — more on installation and troubleshooting
- **[publishing.md](./docs/publishing.md)** — releasing new plugin versions
- **[README.md](./docs/README.md)** — index of the plugin's modules
---
@@ -155,5 +194,6 @@ Everything lives in the **[docs/](./docs)** directory. To get started:
| `ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED` | an attempt to build on install from git — report it to whoever publishes the plugin |
| old code after reinstalling | cache: run `pnpm store prune`, then remove `.next` and `node_modules/@intecion` |
If you get stuck, check **[docs/install.md](./docs/install.md)** or message the
team that maintains the plugin.
If you get stuck, check the troubleshooting table above, see
**[docs/publishing.md](./docs/publishing.md)** for distribution issues, or message
the team that maintains the plugin.