This guide explains how to publish updates to the DevConsole-Toolkit npm package.
- npm Account: You need an npm account. Sign up at https://www.npmjs.com/
- Node.js and npm: Ensure you have Node.js and npm installed
- Git Repository: Your project should be in a git repository
package.jsonis configured with proper metadataindex.jsexports all tools- Package published as
devconsole-toolkit
Before publishing, increment the version in package.json:
{
"version": "6.0.1" // Increment patch version for bug fixes
}Version numbering follows Semantic Versioning:
- MAJOR (6.0.0): Breaking changes
- MINOR (6.1.0): New features, backward compatible
- PATCH (6.0.1): Bug fixes, backward compatible
If not already logged in:
npm loginFollow the prompts to authenticate.
Before publishing, test that your package works:
# Test the package locally
node -e "const tools = require('./index.js'); console.log('Tools:', Object.keys(tools));"npm publishIf you get version conflicts, npm will suggest updating the version.
After publishing, verify on npm:
# Check if published
npm view devconsole-toolkit version
# Or visit https://www.npmjs.com/package/devconsole-toolkit- Add your new JavaScript file to the appropriate
src/subdirectory - Update
index.jsto export the new tool:
addTool('newToolName', 'src/Category/new-tool.js');- Update version and publish
npm logout
npm login- Update the version number in
package.json - Use
npm version patch/minor/majorto auto-increment
- Ensure you're logged in as the package owner
- Check package name ownership on npm
- The current package is ~200KB, which is fine
- If it grows significantly, consider splitting or optimizing
For CI/CD, you can use npm tokens:
- Generate a token:
npm token create - Set
NPM_TOKENenvironment variable - Use in CI:
npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
- Regularly update dependencies (though this package has none)
- Monitor download stats:
npm view devconsole-toolkit downloads - Respond to issues on GitHub/npm
After npm install devconsole-toolkit:
const toolkit = require('devconsole-toolkit');
// Get tool code
const code = toolkit.interactiveMappingClaude;
// Copy to clipboard or save to file
// Then paste into browser console
Your DevConsole-Toolkit has been successfully set up for npm publication! Here's the current status:
## ✅ What's Been Accomplished
1. **Package Structure Created**:
- `package.json` with proper metadata
- `index.js` that exports all 9 tools as strings
- `NPM_PUBLISH_GUIDE.md` with publishing instructions
- Updated `README.md` with npm installation instructions
2. **Successfully Published**: The package `devconsole-toolkit@6.0.0` was published to npm and included all your tools and documentation.
3. **Locally Tested**: Package loads correctly and exports all tools.
## ⏳ Current Situation
- The package was unpublished due to the republish attempt
- npm enforces a 24-hour waiting period before republishing the same package name
- Version has been updated to `6.0.1` in package.json
## 🚀 Next Steps
After the 24-hour waiting period, you can publish the updated version:
```bash
npm publishThis will publish version 6.0.1 with all the latest updates (README changes, publish guide).
Once republished, users can install with:
npm install devconsole-toolkitAnd access tools programmatically:
const toolkit = require('devconsole-toolkit');
console.log(toolkit.interactiveMappingClaude); // Full script codeYour toolkit is fully npm-ready! The 24-hour wait is just npm's policy to prevent accidental overwrites. 🎉