createDartExe function

Future<File> createDartExe(
  1. File dartFile, [
  2. File? destination,
  3. DartleCache? dartleCache
])

Compiles the given dartFile to an executable.

If destination is given, the executable is saved in its location, otherwise it's saved in the DartleCache's executables directory.

Returns the executable File.

Implementation

Future<File> createDartExe(File dartFile,
    [File? destination, DartleCache? dartleCache]) async {
  var exeLocation = destination ?? getExeLocation(dartFile, dartleCache);
  await _dart2exe(dartFile, exeLocation);
  return exeLocation;
}