mirror of
https://github.com/danog/dart-sass.git
synced 2025-01-22 13:51:31 +01:00
Remove CompileResult.sourceFiles
This was never used.
This commit is contained in:
parent
acdea51950
commit
0e42a09fdb
@ -6,7 +6,6 @@ import 'dart:convert';
|
||||
|
||||
import 'package:path/path.dart' as p;
|
||||
import 'package:source_maps/source_maps.dart';
|
||||
import 'package:source_span/source_span.dart';
|
||||
|
||||
import 'ast/sass.dart';
|
||||
import 'async_import_cache.dart';
|
||||
@ -190,12 +189,6 @@ class CompileResult {
|
||||
/// This is `null` if source mapping was disabled for this compilation.
|
||||
SingleMapping? get sourceMap => _serialize.sourceMap;
|
||||
|
||||
/// A map from source file URLs to the corresponding [SourceFile]s.
|
||||
///
|
||||
/// This can be passed to [sourceMap]'s [Mapping.spanFor] method. It's `null`
|
||||
/// if source mapping was disabled for this compilation.
|
||||
Map<String, SourceFile>? get sourceFiles => _serialize.sourceFiles;
|
||||
|
||||
/// The set that will eventually populate the JS API's
|
||||
/// `result.stats.includedFiles` field.
|
||||
///
|
||||
|
@ -3,7 +3,6 @@
|
||||
// https://opensource.org/licenses/MIT.
|
||||
|
||||
import 'package:charcode/charcode.dart';
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:source_maps/source_maps.dart';
|
||||
import 'package:source_span/source_span.dart';
|
||||
|
||||
@ -17,15 +16,6 @@ class SourceMapBuffer implements StringBuffer {
|
||||
/// The source map entries that map the source files to [_buffer].
|
||||
final _entries = <Entry>[];
|
||||
|
||||
/// A map from source file URLs to the corresponding [SourceFile]s.
|
||||
///
|
||||
/// This is of a form that can be passed to [Mapping.spanFor].
|
||||
Map<String, SourceFile> get sourceFiles => UnmodifiableMapView({
|
||||
for (var entry in _sourceFiles.entries)
|
||||
entry.key.toString(): entry.value
|
||||
});
|
||||
final _sourceFiles = <Uri?, SourceFile>{};
|
||||
|
||||
/// The index of the current line in [_buffer].
|
||||
var _line = 0;
|
||||
|
||||
@ -84,7 +74,6 @@ class SourceMapBuffer implements StringBuffer {
|
||||
if (entry.target.offset == target.offset) return;
|
||||
}
|
||||
|
||||
_sourceFiles.putIfAbsent(source.sourceUrl, () => source.file);
|
||||
_entries.add(Entry(source, target, null));
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,6 @@ import 'dart:typed_data';
|
||||
import 'package:charcode/charcode.dart';
|
||||
import 'package:meta/meta.dart';
|
||||
import 'package:source_maps/source_maps.dart';
|
||||
import 'package:source_span/source_span.dart';
|
||||
import 'package:string_scanner/string_scanner.dart';
|
||||
|
||||
import '../ast/css.dart';
|
||||
@ -73,8 +72,7 @@ SerializeResult serialize(CssNode node,
|
||||
|
||||
return SerializeResult(prefix + css,
|
||||
sourceMap:
|
||||
sourceMap ? visitor._buffer.buildSourceMap(prefix: prefix) : null,
|
||||
sourceFiles: sourceMap ? visitor._buffer.sourceFiles : null);
|
||||
sourceMap ? visitor._buffer.buildSourceMap(prefix: prefix) : null);
|
||||
}
|
||||
|
||||
/// Converts [value] to a CSS string.
|
||||
@ -1317,11 +1315,5 @@ class SerializeResult {
|
||||
/// This is `null` if source mapping was disabled for this compilation.
|
||||
final SingleMapping? sourceMap;
|
||||
|
||||
/// A map from source file URLs to the corresponding [SourceFile]s.
|
||||
///
|
||||
/// This can be passed to [sourceMap]'s [Mapping.spanFor] method. It's `null`
|
||||
/// if source mapping was disabled for this compilation.
|
||||
final Map<String, SourceFile>? sourceFiles;
|
||||
|
||||
SerializeResult(this.css, {this.sourceMap, this.sourceFiles});
|
||||
SerializeResult(this.css, {this.sourceMap});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user