mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
23 lines
528 B
Bash
Executable File
23 lines
528 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
# Format Dart files
|
|
echo "Formatting Dart files..."
|
|
|
|
dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
|
|
|
|
# Store original directory
|
|
pushd "$dir" > /dev/null
|
|
|
|
if command -v dart &> /dev/null; then
|
|
find .. -name "*.dart" \
|
|
-not -path "*/.*" \
|
|
-not -path "*/node_modules/*" \
|
|
-not -path "*/build/*" \
|
|
-exec dart format --page-width 120 {} +
|
|
else
|
|
echo "Warning: dart not found. Skipping Dart formatting."
|
|
fi
|
|
|
|
# Return to original directory
|
|
popd > /dev/null |