basil 1.0.0 basil: ^1.0.0 copied to clipboard
A linear build system for Dart projects, designed to be lightweight and extensible.
basil #
A linear build system for Dart projects, designed to be lightweight and extensible.
Features #
- Easily configurable
- Highly flexible
- Fast performance
- Supports parallel execution
- Supports platform-specific build types
Details #
Basil parses the project pubspec.yaml
file and looks for a top-level field named basil
. Other
fields under the basil
tag are called build types. Each build type must specify a field named
cmds
containing a list of shell commands. Build types are executed in descending order, by
default. Build types can be also specified manually.
Getting started #
TODO: List prerequisites and provide or point to information on how to start using the package.
Configuration #
The configuration for basil lives in the root pubspec.yaml
file. The format is as follows:
# Main basil tag specifying ordered build tags.
basil:
# Build type names are arbitrary.
ex1:
# (Required) list of shell commands to execute.
cmds: [ 'cmd1', 'cmd2', ... ]
# (Optional) toggle the execution of this build tag.
enabled: true
# (Optional) execute the shell commands concurrently. Wait for completion before proceeding
# to the next build tag.
parallel: false
# (Optional) list of platforms to execute this build tag on. Platform is determined via
# [Platform.operatingSystem]. Example: platforms: [ 'linux', 'macos' ].
platforms: null
ex2:
...
ex3:
...
Usage #
Once configured, you can start a build via: dart run basil:main
. This will process all of the
build steps in descending order.
Build steps can also be specified individually: dart run basil:main [type...]
. For example:
dart run basil:main build cleanup
will execute exclusively the build
step and the cleanup
step.