Skip to main content

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 l10nDescription
--[no]l10nGenerate l10n first before running other command. (defaults to on)
  • Flavor/Environment :
Flavor/EnvironmentAlternativeDescription
-f dev--flavor devRun project on dev environment (Default)
-f stag--flavor stagRun project on staging environment
-f prod--flavor prodRun project on production environment
  • App Version :
App VersionDescription
--debugRun project on debug mode (Default)
--profileRun project on profile mode
--releaseRun project on release mode (Default)
  • Custom Target :
Custom TargetAlternativeDescription
-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 YamlDescription
--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

  1. Debug Version

    morpheme run --debug
  2. Profile Version

    morpheme run --profile
  3. Release Version

    morpheme run --release

Example - Custom Environment/Flavor

  1. Dev Environment

    morpheme run -f dev

    Alternative:

    morpheme run --flavor dev
  2. Staging Environment

    morpheme run -f stag

    Alternative:

    morpheme run --flavor stag
  3. 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]