UNPKG

code-transmute

Version:

Convert any codebase into any language — without changing its brain.

181 lines (133 loc) 3.58 kB
# 🚀 Deployment Guide for code-transmute This guide will help you deploy the **code-transmute** CLI tool to the npm registry. ## 📋 Pre-deployment Checklist ### 1. **Verify Package Configuration** - [x] Package name is unique and available - [x] Version number is correct (1.0.0) - [x] All dependencies are properly listed - [x] Bin entry point is correct (`dist/cli.js`) - [x] Build scripts are configured ### 2. **Test the Package Locally** ```bash # Build the package npm run build # Test the CLI node dist/cli.js --help # Test with example project node dist/cli.js init -k sk-test -p examples/express-to-fastapi -l python -f fastapi ``` ### 3. **Check Package Contents** ```bash # See what will be published npm pack --dry-run # This should show only: # - dist/ (compiled JavaScript) # - package.json # - README.md # - .npmignore ``` ## 🔐 NPM Account Setup ### 1. **Create NPM Account** - Go to [npmjs.com](https://www.npmjs.com) - Sign up for a free account - Verify your email address ### 2. **Login to NPM** ```bash npm login # Enter your username, password, and email ``` ### 3. **Verify Login** ```bash npm whoami ``` ## 📦 Publishing Steps ### 1. **Final Build** ```bash npm run build ``` ### 2. **Check Package Name Availability** ```bash npm view code-transmute # If it returns 404, the name is available # If it returns package info, you need to choose a different name ``` ### 3. **Publish to NPM** ```bash # Dry run first (optional) npm publish --dry-run # Publish for real npm publish ``` ### 4. **Verify Publication** ```bash # Check on npm website # Visit: https://www.npmjs.com/package/code-transmute # Or check via CLI npm view code-transmute ``` ## 🌍 Global Installation Once published, users can install globally: ```bash # Install globally npm install -g code-transmute # Or use with npx (no installation needed) npx code-transmute init -k sk-your-key -p ./my-project -l python -f fastapi ``` ## 🔄 Updating the Package ### 1. **Update Version** ```bash # Patch version (1.0.0 -> 1.0.1) npm version patch # Minor version (1.0.0 -> 1.1.0) npm version minor # Major version (1.0.0 -> 2.0.0) npm version major ``` ### 2. **Publish Update** ```bash npm publish ``` ## 📊 Package Statistics After publishing, you can track: - **Downloads**: `npm view code-transmute downloads` - **Dependencies**: `npm view code-transmute dependencies` - **Versions**: `npm view code-transmute versions` ## 🛠️ Troubleshooting ### Common Issues: 1. **"Package name already exists"** - Choose a different name in package.json - Or use scoped package: `@parallaxis/code-transmute` 2. **"Authentication failed"** - Run `npm login` again - Check your credentials 3. **"Build failed"** - Run `npm run build` manually - Fix any TypeScript errors 4. **"Permission denied"** - Make sure you're logged in: `npm whoami` - Check if you own the package name ## 🎯 Marketing & Promotion ### 1. **GitHub Repository** - Create a GitHub repository - Update package.json repository URL - Add comprehensive README ### 2. **Documentation** - Add usage examples - Create video demos - Write blog posts ### 3. **Community** - Share on Twitter/LinkedIn - Post on Reddit (r/programming, r/webdev) - Submit to awesome lists ## 📈 Success Metrics Track these metrics after deployment: - **Weekly downloads** - **GitHub stars** - **Issues/PRs** - **Community feedback** ## 🚀 Ready to Deploy! Your package is ready for npm! Run: ```bash npm publish ``` And watch your AI-powered code migration tool go live! 🎉