dvRunWithTargets function
Registers targets and runs the Dartvel CLI with arguments.
What a target package's executable calls. The CLI is the same one the project already runs, so every free target and every other command behaves exactly as it does without the package.
Implementation
Future<void> dvRunWithTargets(
List<String> arguments,
List<DVBuildTarget> targets,
) async {
for (final DVBuildTarget target in targets) {
if (DVBuildTargets.lookup(target.name) == null) {
DVBuildTargets.register(target);
}
}
await impl.main(arguments);
}