How to Build and Publish a Vue.js Component Library with GitHub Actions and Vite

  Рет қаралды 5,705

Let's Talk Dev

Let's Talk Dev

Күн бұрын

Пікірлер: 15
@donnacasterr6223
@donnacasterr6223 Жыл бұрын
Thanks for the Precise and useful tutorial. So many videos on here were just beating around the bush or talking about a totally different technology. Great job.
@letstalkdev
@letstalkdev Жыл бұрын
Thank you so much!
@taylorjohnsonct
@taylorjohnsonct 11 ай бұрын
Great video! It helped me right when I needed it with a good title while being short and to the point. Your explanations on certain config properties were great!
@letstalkdev
@letstalkdev 11 ай бұрын
Thank you very much! Glad you've enjoyed the video
@bobek8030
@bobek8030 6 ай бұрын
is dts required as a plugin? you didint mention this
@letstalkdev
@letstalkdev 6 ай бұрын
Thanks for your comment! Indeed vite-plugin-dts is used in ui-lib. This is particularly useful when you are developing a library or a component in TypeScript and want to distribute it with type definitions, so consumers of your library can have type checking and IntelliSense support in their IDEs. This plugin automatically generates these declaration files from your TypeScript source files as part of the Vite build process. It is responsible for generating /ui-lib/dist/src/main.d.ts and without it you won't have intellisense on imports.
@blindpupil
@blindpupil Жыл бұрын
Thank you. I added some scoped styles in scss and installed the vite sass package to handle it. But after bundling and importing the library, the custom styles are not being applied. Any idea how to fix this so that scoped scss styles in the CL work when imported somewhere in a different project?
@letstalkdev
@letstalkdev Жыл бұрын
Thanks! Interesting issue, the component library build should contain all the styles it needs to render the components properly, I don't really use sass, so I'm not sure, but would it be possible that your sass is not compiled to css at build time?
@blindpupil
@blindpupil Жыл бұрын
Could be@@letstalkdev The problem is that I need to also be able to import scss variables inside the CL to other projects (design tokens). So I'd need make sure the scoped scss is compiled, but the unscoped scss (in @assets) gets also compiled but not removed so that it can be imported. If you ever make a similar implementation to this one please share 🙏 P.D. I ended up with a solution that involves git submodules, but it isn't ideal because I can't run vue-tsc checks in any project that uses the CL. It fails when running tsc in the submodule, and if I remove the submodule from the tsc check then it fails because it's not able to find anything imported from the submodule... 😩
@peoray
@peoray Жыл бұрын
Very insightful video. If I want to publish this to a normal (I guess public npm name), what would I do differently?
@letstalkdev
@letstalkdev Жыл бұрын
Thank you! Well you would need to add npm credentials to an .npmrc file, and make sure package.json isn't set to "private: true", and then just follow the docs for publishing.
@dharnilm
@dharnilm 11 ай бұрын
Hi, I liked your video lots but I am facing some issues with the end result. Is it ok to pick your brains about how to resolve This happens when I type
@letstalkdev
@letstalkdev 10 ай бұрын
Hi and thank you for the feedback! Could you try running the library build script at least once, before starting it in dev / watch mode?
@degradiranjepodcast6776
@degradiranjepodcast6776 Жыл бұрын
Good tutorial, but missing the usage. Also, an advice - someone told you, or you have read somewhere that by waving your hands like this in front of the camera - that you are improving your authority, but you are just mingling with those hands in unnatural way so it becomes annoying :). Just and advice, don't take it personally.
@letstalkdev
@letstalkdev Жыл бұрын
Thanks for your feedback, will take into account!
Publish a Vue Component to NPM // Vite and Vue 3
5:45
LearnVue
Рет қаралды 30 М.
Deploy Vite app on Github pages using Github Actions
11:40
benixal
Рет қаралды 11 М.
БОЙКАЛАР| bayGUYS | 27 шығарылым
28:49
bayGUYS
Рет қаралды 1,1 МЛН
Жездуха 42-серия
29:26
Million Show
Рет қаралды 2,6 МЛН
I Sent a Subscriber to Disneyland
0:27
MrBeast
Рет қаралды 104 МЛН
Why use a monorepo?
6:32
Vercel
Рет қаралды 110 М.
Fully Automated npm publish using GitHub Actions and Semantic Release
26:24
How to write internal UI Libraries for Vue
23:28
Vue Mastery
Рет қаралды 8 М.
This Vue Tailwind Component Library Might Be The Best I've Seen...
8:07
Program With Erik
Рет қаралды 26 М.
Create a Custom Component Library with Vue & Tailwind CSS
24:08
Vue Mastery
Рет қаралды 27 М.
Learn GitHub Actions! Deploy a Vue App to AWS
17:48
Brian Morrison
Рет қаралды 11 М.
How to make your own NPM package (Step-by-Step) 📦
16:46
Under Ctrl
Рет қаралды 39 М.
GitLab CI CD Tutorial for Beginners [Crash Course]
1:09:00
TechWorld with Nana
Рет қаралды 1,3 МЛН
Create a library using Vite lib mode
30:00
Alvaro Dev Labs
Рет қаралды 21 М.
БОЙКАЛАР| bayGUYS | 27 шығарылым
28:49
bayGUYS
Рет қаралды 1,1 МЛН