You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add configuration items in pubspec.yaml to specify the path of the runtime configuration file (compared to the location of pubspec.yaml):
prisma:
prismarc: .prismarc # Prisma runtime configuration, and dotenv can be selected or set togetherdotenv: .env # Prisma runtime load dotenv file, and prismarc can be selected or set togetherschame: prisma/schema.prisma # Custom Prisma schema file path
Find runtime configuration order:
step 1: Read the prisma runtime configuration file path in pubspec.yaml, if it is not configured or can't find pubspec.yaml, it will pop up. Note: It is relatively easy to find the pubspec.yaml file, just read it directly from the current running directory.
step 2: Read the .prismarc configuration file from the current working directory, and exit if the file does not exist
step 3: Read a .prismarc file from the current script directory
step 4: Merge environment variables
The text was updated successfully, but these errors were encountered:
To achieve it, I created a generic config package 👉 https://pub.dev/packages/rc ,Used to implement runtime configuration.
Obviously, runtime configuration is more complex than dotenv, but simpler than YAML because it only uses a unary key-value form. Should be as simple as docenv if you don't use feature configuration.
Add a runtime configuration file, which is added to git ignore, and moves to other directories with the program's compiled binaries.
E.g:
.prismarc
:Add configuration items in
pubspec.yaml
to specify the path of the runtime configuration file (compared to the location ofpubspec.yaml
):Find runtime configuration order:
pubspec.yaml
, it will pop up. Note: It is relatively easy to find thepubspec.yaml
file, just read it directly from the current running directory..prismarc
configuration file from the current working directory, and exit if the file does not exist.prismarc
file from the current script directoryThe text was updated successfully, but these errors were encountered: