compile method
Compiles all dart scripts in the project.
If you set install to true then each compiled script
is added to your PATH by copying it into ~/.dcli/bin.
install defaults to false.
The overwrite flag allows the compile to install the
compiled script even if one of the same name exists in `/.dcli/bin
overwrite defaults to false.
Implementation
Future<void> compile({
bool install = false,
bool overwrite = false,
bool packed = false,
}) async {
await NamedLock(name: _lockName, timeout: _lockTimeout).withLockAsync(
() async {
find('*.dart', workingDirectory: pathToProjectRoot).forEach(
(file) => DartScript.fromFile(
file,
).compile(install: install, overwrite: overwrite, packed: packed),
);
},
waiting: 'Waiting for compile to complete...',
);
}