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
void compile({bool install = false, bool overwrite = false}) {
NamedLock.guard(
name: _lockName,
execution: ExecutionCall<void, PubGetException>(callable: () {
find('*.dart', workingDirectory: pathToProjectRoot).forEach((file) =>
DartScript.fromFile(file)
.compile(install: install, overwrite: overwrite));
}),
waiting: 'Waiting for compile to complete...',
);
}