at_app_bundler 0.3.0 at_app_bundler: ^0.3.0 copied to clipboard
A command-line bundler for at_app_create templates.
The following provides a full guide on how to use at_app_bundler.
Creating a Template #
Setup the template folder structure #
Create a folder with the name for your template, this is preferrably in snake_case. (referred to as <template-name> in the rest of the usage guide)
Within this folder create the following items:
Configure brick.yaml #
You need to include the following fields:
A description of what the template is for
N.B. this is the description generated in the at_app_create model!
A version number for the template
Leave this as an empty map
(Currently unimplemented by the bundler)
Configure template.yaml #
This file provides configuration options for the app output.
Here is the schema:
- dependencies: copy from pubspec.yaml
- include: boolean
Whether the template should allow/include the .env file
- gitignore: boolean
Whether to ignore the .env file - this one is a WIP
- override: boolean
Whether to use the env_override parameters as default values for .env
- include: boolean
- A map of values to be written to the .env file.
- enableR8: boolean
- gradleVersion: string
- kotlinVersion: string
- minSdkVersion: string
- targetSdkVersion: string
- compileSdkVersion: string
Add your code to __brick__ #
Add your additional files and assets to this folder.
Keep in mind that the
__brick__ folder represents the root of the project, so add your code to
N.B. Be careful not to overwrite files that will already be generated by the base templates. (pubspec.yaml, .gitignore, README.md, android/**, ios/**)
N.B. Make sure to use relative imports when referencing other files in the template.
This is an abstraction of the dart bundler in mason_cli.
This bundler writes dart code for at_app_create templates, which provides all of the basic functionality required to generate a Flutter app template from dart code.
Run the bundler #
at_app_bundler bundle <path/to/template>
If you would like to specify the output folder:
at_app_bundler bundle -o <path/to/output> <path/to/template>