Reputation: 1655
I've been playing with React.js for a while and I'm starting to build up a small number of my own components.
What is the approved way of packaging them up into something I can import into different projects?
At the moment, I'm cutting and pasting the actual file around, which is clearly bad. In .NET I would create a new .dll and import that. Publishing a npm package doesn't feel right, although I don't know why.
Upvotes: 1
Views: 205
Reputation: 15515
Create a git repository with your components and reference that repo in your package.json
like:
"package-name": "git+ssh://[email protected]/<user>/<repo>.git"
Upvotes: 1