smf_pipeline 0.3.0
smf_pipeline: ^0.3.0 copied to clipboard
The generation pipeline of the SMF CLI. Selects modules, validates their contributions against the roles they declare, and generates a Flutter app.
smf_pipeline #
The generation pipeline of the SMF CLI: it selects modules, checks their contributions against the roles they declare, and generates a Flutter app from them.
The pipeline knows no concrete module or role. It depends only on the core of the module model, package:smf_contracts/core.dart, and receives the modules and the machine it runs on from the CLI.
Most users use it through the SMF CLI, which passes its modules and the machine to runSmf:
exitCode = await runSmf(
arguments,
modules: modules,
hostFor: ({required verbose}) => host,
);
smf create renders the app in memory, finishes it in a temporary directory (flutter pub get, code generation, the steps of the modules, dart fix and dart format), and then moves it into place. package:smf_pipeline/testing.dart has the contract test harness, which checks that modules follow the rules of their roles and renders the apps they make, and ModulePackage, which checks what the package of a module imports and depends on.
Documentation #
- Test a module: the contract harness and
ModulePackagein the tests of a module. - The generation pipeline: the stages of
smf create. - API reference.