File tree Expand file tree Collapse file tree 4 files changed +33
-2
lines changed Expand file tree Collapse file tree 4 files changed +33
-2
lines changed Original file line number Diff line number Diff line change 3
3
* Fix a bug where ` @extend ` rules loaded through a mixture of ` @import ` and
4
4
` @use ` rules could fail to apply correctly.
5
5
6
+ ### Command-Line Interface
7
+
8
+ * In ` --watch ` mode, delete the source map when the associated source file is
9
+ deleted.
10
+
6
11
## 1.91.0
7
12
8
13
* ** Potentially breaking change:** ` meta.inspect() ` (as well as other systems
Original file line number Diff line number Diff line change @@ -166,7 +166,10 @@ final class _Watcher {
166
166
var url = _canonicalize (path);
167
167
168
168
if (_graph.nodes.containsKey (url)) {
169
- if (_destinationFor (path) case var destination? ) _delete (destination);
169
+ if (_destinationFor (path) case var destination? ) {
170
+ _delete (destination);
171
+ _delete ("$destination .map" );
172
+ }
170
173
}
171
174
172
175
var downstream = _graph.remove (FilesystemImporter .cwd, url);
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ environment:
10
10
sdk : " >=3.6.0 <4.0.0"
11
11
12
12
dependencies :
13
- sass : 1.91.1
13
+ sass : 1.91.1-dev
14
14
15
15
dev_dependencies :
16
16
dartdoc : ^8.0.14
Original file line number Diff line number Diff line change @@ -976,6 +976,29 @@ void sharedTests(Future<TestProcess> runSass(Iterable<String> arguments)) {
976
976
977
977
await d.dir ("dir" , [d.nothing ("out.css" )]).validate ();
978
978
});
979
+
980
+ test ("and deletes the source map" , () async {
981
+ await d.file ("test.scss" , "a {b: c}" ).create ();
982
+
983
+ var sass = await watch (["--source-map" , "test.scss:out.css" ]);
984
+ await expectLater (
985
+ sass.stdout,
986
+ emits (endsWith ('Compiled test.scss to out.css.' )),
987
+ );
988
+ await expectLater (sass.stdout, _watchingForChanges);
989
+ await tickIfPoll ();
990
+
991
+ d.file ("test.scss" ).io.deleteSync ();
992
+ await expectLater (
993
+ sass.stdout,
994
+ emitsInOrder ([
995
+ 'Deleted out.css.' ,
996
+ 'Deleted out.css.map.' ,
997
+ ]));
998
+ await sass.kill ();
999
+
1000
+ await d.nothing ("out.css" ).validate ();
1001
+ });
979
1002
});
980
1003
981
1004
test ("creates a new CSS file when a Sass file is added" , () async {
You can’t perform that action at this time.
0 commit comments