default:
	@echo Specify command to run

add-platform:
	flutter create --template=plugin --project-name payengine --platforms=web .

publish:
	dart pub publish

format:
	dart format .
	

# Extract version from pubspec.yaml
VERSION := $(shell grep '^version:' pubspec.yaml | awk '{print $$2}')

# Define the documentation directory
DOC_DIR := docs/$(VERSION)

# Command to generate the documentation
build-documentation:
	@echo "Generating documentation for version $(VERSION)..."
	mkdir -p $(DOC_DIR)  # Create the versioned docs directory
	dart doc --output $(DOC_DIR)  # Generate Dart documentation inside the directory
	@echo "Documentation generated in $(DOC_DIR)"
