mirror of
https://github.com/chenasraf/flame_ui.git
synced 2026-05-17 17:38:07 +00:00
build: add precommit hook
This commit is contained in:
15
Makefile
Normal file
15
Makefile
Normal file
@@ -0,0 +1,15 @@
|
||||
.PHONY: precommit precommit-install
|
||||
|
||||
# Run the pre-commit checks
|
||||
precommit:
|
||||
@echo "🔍 Formatting staged files..."
|
||||
@git diff --cached --name-only | grep '\.dart$$' | xargs -r dart format > /dev/null
|
||||
@git diff --cached --name-only | grep '\.md$$' | xargs -r prettier --write > /dev/null
|
||||
@git ls-files -m | grep -E '\.dart$$|\.md$$' | xargs -r git add
|
||||
|
||||
# Install a pre-commit Git hook that runs `make precommit`
|
||||
precommit-install:
|
||||
@echo "#!/bin/sh" > .git/hooks/pre-commit
|
||||
@echo "exec make precommit" >> .git/hooks/pre-commit
|
||||
chmod +x .git/hooks/pre-commit
|
||||
@echo "✅ Pre-commit hook installed."
|
||||
@@ -1,16 +0,0 @@
|
||||
# flame_ui_example
|
||||
|
||||
A new Flutter project.
|
||||
|
||||
## Getting Started
|
||||
|
||||
This project is a starting point for a Flutter application.
|
||||
|
||||
A few resources to get you started if this is your first Flutter project:
|
||||
|
||||
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
|
||||
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
|
||||
|
||||
For help getting started with Flutter development, view the
|
||||
[online documentation](https://docs.flutter.dev/), which offers tutorials,
|
||||
samples, guidance on mobile development, and a full API reference.
|
||||
@@ -1,5 +1,8 @@
|
||||
# Launch Screen Assets
|
||||
|
||||
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
|
||||
You can customize the launch screen with your own desired assets by replacing the image files in
|
||||
this directory.
|
||||
|
||||
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
|
||||
You can also do it by opening your Flutter project's Xcode project with
|
||||
`open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and
|
||||
dropping in the desired images.
|
||||
|
||||
Reference in New Issue
Block a user