| #!/bin/bash |
|
|
| |
| |
|
|
| echo "π Starting SoftEdge Corporation Development Environment" |
| echo "======================================================" |
|
|
| |
| if ! command -v node &> /dev/null; then |
| echo "β Node.js is not installed. Please install Node.js first." |
| exit 1 |
| fi |
|
|
| |
| 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)" |
|
|
| |
| echo "" |
| echo "π¦ Installing dependencies..." |
| npm install |
|
|
| if [ $? -ne 0 ]; then |
| echo "β Failed to install dependencies" |
| exit 1 |
| fi |
|
|
| echo "β
Dependencies installed successfully" |
|
|
| |
| 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" |
|
|
| |
| 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." |
|
|