Run
This command has a function to run our project. With this command we can adjust which project environment and which application version we want to run according to the project configuration in the morpheme.yaml
file.
Default Command
morpheme run
By default this command will run the project on the dev environment release version.
Options
morpheme run [arguments]
To see all available options and flags, run morpheme run --help
.
Available Options
- Generate l10n :
Generate l10n | Description | |
---|---|---|
--[no]l10n | Generate l10n first before running other command. (defaults to on) |
- Flavor/Environment :
Flavor/Environment | Alternative | Description |
---|---|---|
-f dev | --flavor dev | Run project on dev environment (Default) |
-f stag | --flavor stag | Run project on staging environment |
-f prod | --flavor prod | Run project on production environment |
- App Version :
App Version | Description |
---|---|
--debug | Run project on debug mode (Default) |
--profile | Run project on profile mode |
--release | Run project on release mode (Default) |
- Custom Target :
Custom Target | Alternative | Description |
---|---|---|
-t [path_file] | --target [path_file] | This command is used to run the application in a specific file, by default it will run the lib/main.dart file. |
- Custom Morpheme Yaml :
Custom Morpheme Yaml | Description |
---|---|
--morpheme-yaml [path_file] | This command is used to select yaml config the application in a specific file, by default it will run the morpheme.yaml file. |
Example - Custom Version
Debug Version
morpheme run --debug
Profile Version
morpheme run --profile
Release Version
morpheme run --release
Example - Custom Environment/Flavor
Dev Environment
morpheme run -f dev
Alternative:
morpheme run --flavor dev
Staging Environment
morpheme run -f stag
Alternative:
morpheme run --flavor stag
Production Environment
morpheme run -f prod
Alternative:
morpheme run --flavor prod
Example - Version and Environment Combination
morpheme run --release -f stag
This following command will run your app on staging environment with release mode.
Example - Custom Target File
morpheme run -t [url_file *optional]
Alternative:
morpheme run --target [url_file *optional]