#!/bin/bash # Baba Yaga VS Code Extension Installation Script echo "🚀 Installing Baba Yaga VS Code Extension..." # Check if Node.js is installed if ! command -v node &> /dev/null; then echo "❌ Node.js is required but not installed. Please install Node.js first." exit 1 fi # Check if npm is installed if ! command -v npm &> /dev/null; then echo "❌ npm is required but not installed. Please install npm first." exit 1 fi # Check if vsce is installed if ! command -v vsce &> /dev/null; then echo "📦 Installing vsce (VS Code Extension Manager)..." npm install -g @vscode/vsce fi # Install dependencies echo "📦 Installing dependencies..." npm install # Package the extension echo "📦 Packaging extension..." vsce package --allow-missing-repository # Check if packaging was successful if [ $? -ne 0 ]; then echo "❌ Extension packaging failed. Please check the errors above." exit 1 fi echo "✅ Extension packaged successfully!" echo "" echo "📋 To install the extension in VS Code:" echo "1. Open VS Code" echo "2. Go to Extensions (Ctrl+Shift+X)" echo "3. Click the '...' menu and select 'Install from VSIX...'" echo "4. Choose the generated 'baba-yaga-0.1.0.vsix' file" echo "" echo "🎉 Enjoy coding in Baba Yaga!"