UNPKG

devkit-starter-pro

Version:

Professional-grade starter templates for Node.js and React developers. Premium templates with advanced features and license validation.

108 lines (75 loc) 2.36 kB
# Gas Boy - Script Update Otomatis Workflow otomatis untuk version bump dan publish ke npm. ## Penggunaan ### Perintah Dasar ```bash # Mode interaktif (akan menampilkan pilihan version bump) npm run gas-boy # Patch version (1.0.0 → 1.0.1) - untuk bug fixes npm run gas-boy:patch # Minor version (1.0.0 → 1.1.0) - untuk fitur baru npm run gas-boy:minor # Major version (1.0.0 → 2.0.0) - untuk breaking changes npm run gas-boy:major # Dry run (test tanpa actual publish) npm run gas-boy:dry ``` ### Opsi Lanjutan ```bash # Custom commit message npm run gas-boy -- --message="feat: tambah dukungan template React" # Version type spesifik dengan custom message npm run gas-boy:minor -- --message="feat: tambah opsi CLI baru" ``` ## Alur Kerja Gas Boy akan melakukan langkah-langkah berikut secara otomatis: 1. **📋 Cek Status Git** - Memastikan working directory bersih 2. **🔧 Lint & Format** - Menjalankan ESLint dan Prettier 3. **📦 Version Bump** - Update version di package.json 4. **📝 Git Workflow** - Add, commit, tag, dan push ke repository 5. **📤 NPM Publish** - Publish ke npm registry 6. **🔍 Verifikasi** - Memverifikasi package sudah terpublish ## Fitur Keamanan -**Cek Status Git** - Pastikan tidak ada uncommitted changes -**Prompt Konfirmasi** - Konfirmasi sebelum publish -**Mode Dry Run** - Test workflow tanpa actual publish -**Error Handling** - Rollback jika ada error -**Verifikasi** - Cek published version ## Contoh Penggunaan ### Skenario 1: Perbaikan Bug ```bash # Perbaiki bug di kode # Lalu jalankan: npm run gas-boy:patch ``` ### Skenario 2: Fitur Baru ```bash # Tambah fitur baru # Lalu jalankan: npm run gas-boy:minor -- --message="feat: tambah dukungan template PHP" ``` ### Skenario 3: Test Perubahan ```bash # Test workflow tanpa publish npm run gas-boy:dry ``` ## Persyaratan - Git repository sudah diinisialisasi - Working directory bersih (tidak ada uncommitted changes) - NPM login (`npm whoami` harus berfungsi) - Semua lint error sudah diselesaikan ## Troubleshooting ### "Git working directory is not clean" ```bash git add . git commit -m "perubahan anda" # atau git stash ``` ### "npm publish failed" - Cek apakah sudah login: `npm whoami` - Cek apakah version sudah ada: `npm view arima-cli` ### ESLint errors ```bash npm run lint:fix ```