When it comes to working in a team or an organization it often involves reusing a collection of repositories or code-bases(components) in multiple projects again and again.
To make it easier for every developer out there to access and utilize these components, it’s usually recommended to publish these components to the NPM registry as public open source projects that can be reused.
However, if the components are private and only used within the scope of the organization, the best option is to use Github packages.
In this article, I’ll guide you through the process of publishing a Vue 3 component library built with typescript to Github Packages, which includes the following steps:
- Creating a Vue.js 3 project using Vite
- Building a component of the library
- Configuring Vite to package the library for publishing
- Setting up Github Actions for automated publishing to Github Packages
- Testing the component as a dependency in another project