'Best approach to (re)use a non-published demo of a component
I'm writing a npm package containing a vue component and a demo (also component).
Normally I would not publish the demo to npm as that increases dependencies and package size, all for a selfish purpose of gaining the demo component for reuse.
However, I would still like to embed the demo in my company homepage and I would like to do it without actually duplicating the code.
I was thinking I could maybe publish a scoped package containing just the demo. It would bring some additional complexity to the original package source repository in terms of maintaining two different package.json files and, also, it's probably better to type npm run serveto see the demo instead of cd demo && npm run serve.
A hardlink is another option, but mostly viable only while I'm the only person maintaining the company website. And it still requires manual maintenance of dependencies.
Or maybe I just don't know enough about npm publishing and this is somehow super-trivial.
So, are there any best practices or examples on the subject?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
