Last active
October 7, 2024 12:37
-
-
Save carlos-regis/9fe88e8d44e93909e961384bd6c2a0d9 to your computer and use it in GitHub Desktop.
PowerShell Flutter Aliases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # RUN | |
| function Invoke-FlutterRun() | |
| { | |
| flutter run | |
| } | |
| Set-Alias -Name frun -Value Invoke-FlutterRun | |
| # BUILD | |
| function Invoke-FlutterBuild() | |
| { | |
| flutter build | |
| } | |
| Set-Alias -Name fbuild -Value Invoke-FlutterBuild | |
| function Invoke-FlutterClean() | |
| { | |
| flutter clean | |
| } | |
| Set-Alias -Name fclean -Value Invoke-FlutterClean | |
| # LINTING | |
| function Invoke-FlutterAnalyze() | |
| { | |
| flutter analyze | |
| } | |
| Set-Alias -Name fanalyze -Value Invoke-FlutterAnalyze | |
| function Invoke-FlutterTest() | |
| { | |
| flutter test | |
| } | |
| Set-Alias -Name ftest -Value Invoke-FlutterTest | |
| function Invoke-FlutterAnalyzeTest() | |
| { | |
| Invoke-FlutterAnalyze | |
| Invoke-FlutterTest | |
| } | |
| Set-Alias -Name fanalyzetest -Value Invoke-FlutterAnalyzeTest | |
| # DEPENDENCIES MANAGEMENT | |
| function Invoke-FlutterGetPackages() | |
| { | |
| flutter pub get | |
| } | |
| Set-Alias -Name fgetpackages -Value Invoke-FlutterGetPackages | |
| function Invoke-FlutterUpgradePackages() | |
| { | |
| flutter pub upgrade | |
| } | |
| Set-Alias -Name fupgradepackages -Value Invoke-FlutterUpgradePackages | |
| function Invoke-FlutterUpgradePackagesToMajorVersions() | |
| { | |
| flutter pub upgrade --major-versions | |
| } | |
| Set-Alias -Name fupgradepackagestomajorversions -Value Invoke-FlutterUpgradePackagesToMajorVersions | |
| function Invoke-FlutterOutdatedPackages() | |
| { | |
| flutter pub outdated | |
| } | |
| Set-Alias -Name foutdatedpackages -Value Invoke-FlutterOutdatedPackages | |
| # SPECIFIC PACKAGES | |
| function Invoke-FlutterAddPackage([string]$name, [bool]$dev) | |
| { | |
| if([String]::IsNullOrWhiteSpace($name)) | |
| { | |
| Write-Output "No package provided" | |
| return | |
| } | |
| if($dev) | |
| { | |
| flutter pub add --dev $name | |
| } | |
| else | |
| { | |
| flutter pub add $name | |
| } | |
| Invoke-FlutterGetPackages | |
| } | |
| Set-Alias -Name faddpackage -Value Invoke-FlutterAddPackage | |
| function Invoke-FlutterRemovePackage([string]$name) | |
| { | |
| if([String]::IsNullOrWhiteSpace($name)) | |
| { | |
| Write-Output "No package provided" | |
| return | |
| } | |
| flutter pub remove $name | |
| Invoke-FlutterGetPackages | |
| } | |
| Set-Alias -Name fremovepackage -Value Invoke-FlutterRemovePackage | |
| # FLUTTER SDK | |
| function Invoke-FlutterUpgradeSdk() | |
| { | |
| flutter upgrade | |
| } | |
| Set-Alias -Name fupgradesdk -Value Invoke-FlutterUpgradeSdk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment