compileToResultAsync function
Future<CompileResult>
compileToResultAsync(
- String path, {
- bool color = false,
- Logger? logger,
- Iterable<
AsyncImporter> ? importers, - PackageConfig? packageConfig,
- Iterable<
String> ? loadPaths, - Iterable<
AsyncCallable> ? functions, - OutputStyle? style,
- bool quietDeps = false,
- bool verbose = false,
- bool sourceMap = false,
- bool charset = true,
- Iterable<
Deprecation> ? silenceDeprecations, - Iterable<
Deprecation> ? fatalDeprecations, - Iterable<
Deprecation> ? futureDeprecations,
Like compileToResult, except it runs asynchronously.
Running asynchronously allows this to take AsyncImporters rather than synchronous Importers. However, running asynchronously is also somewhat slower, so compileToResult should be preferred if possible.
Implementation
Future<CompileResult> compileToResultAsync(String path,
{bool color = false,
Logger? logger,
Iterable<AsyncImporter>? importers,
PackageConfig? packageConfig,
Iterable<String>? loadPaths,
Iterable<AsyncCallable>? functions,
OutputStyle? style,
bool quietDeps = false,
bool verbose = false,
bool sourceMap = false,
bool charset = true,
Iterable<Deprecation>? silenceDeprecations,
Iterable<Deprecation>? fatalDeprecations,
Iterable<Deprecation>? futureDeprecations}) =>
c.compileAsync(path,
logger: logger,
importCache: AsyncImportCache(
importers: importers,
logger: AsyncImportCache.wrapLogger(logger, silenceDeprecations,
fatalDeprecations, futureDeprecations,
color: color),
loadPaths: loadPaths,
packageConfig: packageConfig),
functions: functions,
style: style,
quietDeps: quietDeps,
verbose: verbose,
sourceMap: sourceMap,
charset: charset,
silenceDeprecations: silenceDeprecations,
fatalDeprecations: fatalDeprecations,
futureDeprecations: futureDeprecations);