Skip to content

Commit 93c3572

Browse files
committed
docs: 📝 add publishing instructions
1 parent 79e5811 commit 93c3572

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

README.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# SvelteKit Embed
22

33
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
4+
45
[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)
6+
57
<!-- ALL-CONTRIBUTORS-BADGE:END -->
68

79
[![MadeWithSvelte.com shield](https://madewithsvelte.com/storage/repo-shields/3786-shield.svg)](https://madewithsvelte.com/p/sveltekit-embed/shield-link)
@@ -11,9 +13,9 @@ packaged up for use.
1113

1214
![sveltekit embed cover](.github/sveltekit-embed.jpg)
1315

14-
Each component is wrapped in an intersection observer
15-
`GeneralObserver` which will load up the component when it scrolls
16-
into the viewport.
16+
Each component with the exception of `Toot` and `Tweet` is wrapped in
17+
an intersection observer `GeneralObserver` which will load up the
18+
component when it scrolls into the viewport.
1719

1820
## Use
1921

@@ -81,6 +83,29 @@ Credit to [@pauliescanlon](https://github.com/pauliescanlon) for the
8183
original version of this project in
8284
[MDX Embed](https://github.com/pauliescanlon/mdx-embed).
8385

86+
## Packaging for NPM
87+
88+
Scott, this is here for you to remember how to do this 🙃
89+
90+
Although I detailed this in
91+
[Making npm Packages with SvelteKit](https://scottspence.com/posts/making-npm-packages-with-sveltekit)
92+
I think it's best to put it here as I always come to the README and
93+
the instructions are never there! 😅
94+
95+
**Publish the project to NPM**
96+
97+
```bash
98+
# authenticate with npm
99+
npm login
100+
# bump version with npm
101+
npm version 0.0.2
102+
# package with sveltkit
103+
pnpm run package
104+
# publish from package directory
105+
cd package
106+
npm publish
107+
```
108+
84109
## Contributors ✨
85110

86111
Thanks goes to these wonderful people

0 commit comments

Comments
 (0)