-
Update package.json
- Set correct author name:
"author": "Your Name <your.email@example.com>" - Verify version number
- Repository URLs are already configured ✅
- Set correct author name:
-
Test the library
npm run build
-
Create NPM account (if you don't have one)
- Visit https://www.npmjs.com/signup
- Verify your email address
npm loginnpm view use-shared-stateIf this returns an error, the name is available!
npm publish- Visit https://www.npmjs.com/package/use-shared-state
- Test installation:
npm install @stackoverprof/use-shared-state swr
-
Add badges to README
[](https://badge.fury.io/js/use-shared-state) [](https://www.npmjs.com/package/use-shared-state)
-
Optional: Set up GitHub repository
- Create repository for source code
- Add repository URLs to package.json later if needed
- Make changes
- Update version (follow semantic versioning)
npm version patch # for bug fixes npm version minor # for new features npm version major # for breaking changes
- Build and publish
npm run build npm publish
Your package.json is already configured correctly. Just update the author name and you're ready to publish!