Files
sLogos/Makefile
sHa c30f8921c2 feat: Add image generation for SVG logos and improve clipboard functionality
- Added @resvg/resvg-js dependency for SVG to PNG/JPG conversion.
- Implemented pregeneration of PNG and JPG images from SVG files in the scanLogos script.
- Enhanced copy URL functionality in App.svelte to support modern clipboard API with fallbacks.
- Removed unnecessary onCopy prop from LogoActions component and handled copy actions locally.
- Introduced notification system for copy actions with success/error feedback.
- Updated styles for action buttons and notifications for better user experience.
- Cleaned up unused code and improved overall structure for clarity.
2025-04-28 22:43:39 +03:00

63 lines
1.8 KiB
Makefile

# Logo Gallery Project Makefile
# Configuration
DOCKER_COMPOSE = docker compose
CONTAINER_NAME = logo-gallery
DEV_PORT = 5006
# Main targets
.PHONY: all build start stop restart logs clean scan-logos dev rebuild
all: build start
# Development mode with hot reloading
dev:
$(DOCKER_COMPOSE) -f compose.dev.yml up --build
# Build the Docker container
build:
@echo "Building the Logo Gallery container..."
$(DOCKER_COMPOSE) -f compose.dev.yml build
# Start the application in the background
start:
@echo "Starting Logo Gallery application on port $(DEV_PORT)..."
$(DOCKER_COMPOSE) -f compose.dev.yml up -d
@echo "Application is running at http://localhost:$(DEV_PORT)"
# Stop the application
stop:
@echo "Stopping Logo Gallery application..."
$(DOCKER_COMPOSE) -f compose.dev.yml down
# Restart the application
restart: stop start
# View the application logs
logs:
@echo "Showing application logs (press Ctrl+C to exit)..."
$(DOCKER_COMPOSE) -f compose.dev.yml logs -f
# Run a command inside the container
# Usage: make run CMD="npm run build"
run:
@echo "Running command in container: $(CMD)"
$(DOCKER_COMPOSE) -f compose.dev.yml run --rm $(CONTAINER_NAME) $(CMD)
# Scan logos.json from files in the logos directory (for dev mode)
scan-logos:
@echo "Scanning logos directory and updating logos.json for development..."
$(DOCKER_COMPOSE) -f compose.dev.yml run --rm slogos-dev npm run scan-logos
@echo "Logos have been updated - refresh the browser to see changes"
# Clean up build artifacts and temporary files
clean:
@echo "Cleaning up build artifacts and temporary files..."
$(DOCKER_COMPOSE) -f compose.dev.yml down
docker builder prune -f
# Complete rebuild from scratch
rebuild:
$(DOCKER_COMPOSE) -f compose.dev.yml down -v
$(DOCKER_COMPOSE) -f compose.dev.yml build --no-cache