Spaces:
Sleeping
Sleeping
File size: 1,411 Bytes
220b380 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
#!/bin/bash
# SoftEdge Corporation - Development Script
# This script sets up the development environment for React integration
echo "π Starting SoftEdge Corporation Development Environment"
echo "======================================================"
# Check if Node.js is installed
if ! command -v node &> /dev/null; then
echo "β Node.js is 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 not installed. Please install npm first."
exit 1
fi
echo "β
Node.js version: $(node --version)"
echo "β
npm version: $(npm --version)"
# Install dependencies
echo ""
echo "π¦ Installing dependencies..."
npm install
if [ $? -ne 0 ]; then
echo "β Failed to install dependencies"
exit 1
fi
echo "β
Dependencies installed successfully"
# Build React app
echo ""
echo "π¨ Building React application..."
npm run build
if [ $? -ne 0 ]; then
echo "β Failed to build React application"
exit 1
fi
echo "β
React application built successfully"
# Start development server (optional)
echo ""
echo "π‘ Development environment ready!"
echo ""
echo "To start the development server, run:"
echo " npm run dev"
echo ""
echo "To build for production:"
echo " npm run build"
echo ""
echo "The built files are in the 'dist/' directory and can be served by your PHP application."
|