Skip to content

Commit 96e1b95

Browse files
committed
docs: add note about npm publish
1 parent 57a2ce1 commit 96e1b95

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,37 @@ const { count, increment } = useMyPlugin()
157157
</script>
158158
```
159159

160+
## 📦 Publishing to npm
161+
162+
Before publishing your plugin to npm, make sure you've:
163+
164+
1. **Updated `package.json`** with your plugin details:
165+
- Change `name` to your package name
166+
- Update `version`, `description`, `author`, and `keywords`
167+
- Set `repository` URL if applicable
168+
169+
2. **Built your plugin**:
170+
```bash
171+
npm run build
172+
```
173+
174+
3. **Tested thoroughly**:
175+
```bash
176+
npm test
177+
```
178+
179+
4. **Log in to npm** (if not already logged in):
180+
```bash
181+
npm login
182+
```
183+
184+
5. **Publish to npm**:
185+
```bash
186+
npm publish
187+
```
188+
189+
> **Note:** The `prepublishOnly` script will automatically run the build before publishing.
190+
160191
## 🤝 Contributing
161192

162193
Contributions are welcome! Please feel free to submit a Pull Request.

0 commit comments

Comments
 (0)