@@ -61,6 +61,9 @@ export 'src/warn.dart' show warn;
6161///
6262/// The [style] parameter controls the style of the resulting CSS.
6363///
64+ /// If [quietDeps] is `true` , this will silence compiler warnings emitted for
65+ /// stylesheets loaded through [importers] , [loadPaths] , or [packageConfig] .
66+ ///
6467/// If [sourceMap] is passed, it's passed a [SingleMapping] that indicates which
6568/// sections of the source file(s) correspond to which in the resulting CSS.
6669/// It's called immediately before this method returns, and only if compilation
@@ -94,6 +97,7 @@ String compile(String path,
9497 PackageConfig ? packageConfig,
9598 Iterable <Callable >? functions,
9699 OutputStyle ? style,
100+ bool quietDeps = false ,
97101 void sourceMap (SingleMapping map)? ,
98102 bool charset = true }) {
99103 logger ?? = Logger .stderr (color: color);
@@ -106,6 +110,7 @@ String compile(String path,
106110 packageConfig: packageConfig),
107111 functions: functions,
108112 style: style,
113+ quietDeps: quietDeps,
109114 sourceMap: sourceMap != null ,
110115 charset: charset);
111116 result.sourceMap.andThen (sourceMap);
@@ -150,6 +155,9 @@ String compile(String path,
150155/// [String] or a [Uri] . If [importer] is passed, [url] must be passed as well
151156/// and `importer.load(url)` should return `source` .
152157///
158+ /// If [quietDeps] is `true` , this will silence compiler warnings emitted for
159+ /// stylesheets loaded through [importers] , [loadPaths] , or [packageConfig] .
160+ ///
153161/// If [sourceMap] is passed, it's passed a [SingleMapping] that indicates which
154162/// sections of the source file(s) correspond to which in the resulting CSS.
155163/// It's called immediately before this method returns, and only if compilation
@@ -186,6 +194,7 @@ String compileString(String source,
186194 OutputStyle ? style,
187195 Importer ? importer,
188196 Object ? url,
197+ bool quietDeps = false ,
189198 void sourceMap (SingleMapping map)? ,
190199 bool charset = true ,
191200 @Deprecated ("Use syntax instead." ) bool indented = false }) {
@@ -202,6 +211,7 @@ String compileString(String source,
202211 style: style,
203212 importer: importer,
204213 url: url,
214+ quietDeps: quietDeps,
205215 sourceMap: sourceMap != null ,
206216 charset: charset);
207217 result.sourceMap.andThen (sourceMap);
@@ -221,6 +231,7 @@ Future<String> compileAsync(String path,
221231 Iterable <String >? loadPaths,
222232 Iterable <AsyncCallable >? functions,
223233 OutputStyle ? style,
234+ bool quietDeps = false ,
224235 void sourceMap (SingleMapping map)? }) async {
225236 logger ?? = Logger .stderr (color: color);
226237 var result = await c.compileAsync (path,
@@ -232,6 +243,7 @@ Future<String> compileAsync(String path,
232243 packageConfig: packageConfig),
233244 functions: functions,
234245 style: style,
246+ quietDeps: quietDeps,
235247 sourceMap: sourceMap != null );
236248 result.sourceMap.andThen (sourceMap);
237249 return result.css;
@@ -253,6 +265,7 @@ Future<String> compileStringAsync(String source,
253265 OutputStyle ? style,
254266 AsyncImporter ? importer,
255267 Object ? url,
268+ bool quietDeps = false ,
256269 void sourceMap (SingleMapping map)? ,
257270 bool charset = true ,
258271 @Deprecated ("Use syntax instead." ) bool indented = false }) async {
@@ -269,6 +282,7 @@ Future<String> compileStringAsync(String source,
269282 style: style,
270283 importer: importer,
271284 url: url,
285+ quietDeps: quietDeps,
272286 sourceMap: sourceMap != null ,
273287 charset: charset);
274288 result.sourceMap.andThen (sourceMap);
0 commit comments