Finch CLI
Finch biedt een commandoregelinterface (CLI) voor het beheren en gebruiken van je Finch-applicaties. De CLI biedt verschillende opdrachten om veelvoorkomende taken te vereenvoudigen, waardoor het makkelijker wordt om applicaties te ontwikkelen, testen en uit te rollen.
Naast de opdrachten die Finch biedt, kun je ook andere Dart CLI-opdrachten gebruiken. Bijvoorbeeld dart pub get om de afhankelijkheden van je project op te halen. Het is optioneel om de Finch CLI te gebruiken; je kunt ook rechtstreeks de Dart CLI gebruiken.
Finch CLI installeren
dart pub global activate finch
Finch CLI uitvoeren
Om de lijst met beschikbare opdrachten te zien, voer je de volgende opdracht uit:
finch -h
✔ templates
Show the list of available templates
✔ create
Make new project
-p, --path Path of the project
-n, --name Name of project
-d, --docker Use docker
-t, --template Project template [simple, example,...]
✔ get
Get packages of project, (dart pub get)
✔ runner
Build runner of project, (dart pub run build_runner build)
✔ run
Run project, (dart run)
-p, --path Path of app file
-a, --args Arguments for app file
✔ serve
Serve project with file watcher
-p, --path Path of app file
-a, --args Arguments for app file
✔ build
Build Project (dart compile exe)
-c, --cli Build for cli
-a, --appPath Path of app file
-l, --langPath Languages path
-p, --publicPath Public path
-w, --widgetPath Widgets path
-e, --envPath Envitoment file (.env) path
-o, --output Output path
-t, --type Type of build (zip, exe)
✔ migrate
Migrate project to new version of Finch
-c, --create Create new project and move files
-n, --name Name of migration file (only for create option)
-s, --sqlite Migrate SQLite files
✔ test
Unit test of project, (dart test)
-r, --reporter Set how to print test results
-h, --help Show the help
-v, --version Finch Version
-u, --update Update Finch