Skip to content

Commit 3cdfe8f

Browse files
committed
docs: mention yalc for testing libraries locally
1 parent 1d82fb2 commit 3cdfe8f

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

docs/pages/faq.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ There are 2 parts to this process.
8484

8585
## How to test the library in an app locally?
8686

87-
You may have come across the `yarn link` and `npm link` commands to test libraries locally. These commands work great for simple packages without build process, but they have different behavior from how a published package works.
87+
You may have come across the `yarn link` and `npm link` commands, or used `npm install ../path/to/folder` or `yarn add ../path/to/folder` to test libraries locally. These commands may work for simple packages without build process, but they have different behavior from how a published package works, e.g. `.npmignore` is not respected, the structure of `node_modules` is different, etc. So we don't recommended using these approaches to test libraries locally.
8888

89-
For more accurate testing, we recommend following approaches:
89+
For more accurate testing, there are various other approaches:
9090

9191
1. **Local tarball with `npm`**
9292

@@ -112,7 +112,13 @@ For more accurate testing, we recommend following approaches:
112112
npm install ../path/to/your-library-name-0.0.0-local.0.tgz
113113
```
114114

115-
2. **Verdaccio**
115+
2. **Yalc**
116+
117+
[Yalc](https://github.com/wclr/yalc) acts as a local repository for packages that can be used to test packages locally. It's similar to the previous workflow, but more convenient to use.
118+
119+
You can find installation and usage instructions in the [Yalc documentation](https://github.com/wclr/yalc#installation).
120+
121+
3. **Verdaccio**
116122

117123
[Verdaccio](https://verdaccio.org/) is a lightweight private npm registry that can be used to test packages locally. The advantage of using Verdaccio is that it allows to test the complete workflow of publishing and installing a package without actually publishing it to a remote registry.
118124

0 commit comments

Comments
 (0)