How To Make and Publish a Svelte Library - Weekly Svelte
HTML-код
- Опубликовано: 18 ноя 2021
- 1. npm init svelte@next project-name
2. cd project-name
3. Create component
4. npx svelte-kit package
5. cd package
6. Login to npm / create an account
7. npm publish --access public
Become a Level Up Pro and take your web skills to the next level!
www.leveluptutorials.com/pro?...
Svelte for Beginners
leveluptutorials.com/tutorial...
The best web development podcast out there
Syntax with Wes Bos and Scott Tolinski
syntax.fm
Can't wait to hear your talk tomorrow at Svelte Summit
Thank you so much for such a great video. It is lovely how the Svelte guys have improved so much the tools that all the small things you needed to do in the video are not required anymore.
Thank you sir for creating this tutorial, very useful and practical, awesome 🤩
It feels like SvelteKit, Remix, Next and so on are completely taking over the web. Can you do more in depth tutorial on server-side rendering and how it can replace Singe Page Apps?
thank you for the great tutos like always
This is really great! Now I can publish my svelte modal!
You can find the published library here: github.com/leveluptuts/auto-form
It's still in flux, but def usable. I'm sure there are many issues although we are using it on leveluptutorials.com . File issues and prs if you want to get involved.
That's amazing. I'll make it a goal to publish to NPM!
Can a store in your package be used like a store in your app when u import that package. It seems finicky for me
I love you Scott!
This is easily the most exciting thing to happen to JavaScript since ES6.
How do you get the version number in your terminal?
Excellent video
Super easy!
What theme are you using?
Ok I've been stuck on this since last night but just realized wasnt working cause I was importing like import { AutoForm } from instead of import AutoForm. Can you not do it like { AutoForm, SubButton } lets say if have multiple components?
I'm dealing with the same issue! What if I have multiple components? Did you manage to get the solution?
@@mbparvezme hey I'm curious about this too! did you find a solution??
That was easy!
Can u add actions to package? Or what about global css variables like idk -error-red-color
Yep! Any of those shoud be fine. We have an action package ourselves
Im not sure that the :global css stuff works
Hey I have 1 svelte kit app I want to use that app in my current on going svelte kit app .How to integrate with all functionality like stores and routing?
Why do a sveltekit package instead of just a svelte package?
x2
4:10 Why doesn't mine work like this? I have created exactly what you have above, but it's not recognizing '$lib/components/asdfasf' paths at all. 🤷♂ What gives??
Apparently Run npm i and restart your TypeScript server. BUT WHY does it do that!? 🤦♂