File tree Expand file tree Collapse file tree 3 files changed +35
-1
lines changed Expand file tree Collapse file tree 3 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 99// Local styles and rules.
1010@use ' src/_variables' ;
1111@use ' src/_base' ;
12+ @use ' src/_alerts' ;
1213@use ' src/_site_header' ;
1314@use ' src/_activity_log' ;
1415@use ' src/_detail_page' ;
2021@use ' src/_report' ;
2122@use ' src/_scores' ;
2223@use ' src/_search' ;
23- @use ' src/_staging_ribbon.scss ' ;
24+ @use ' src/_staging_ribbon' ;
2425@use ' src/_tags' ;
2526@use ' src/_topics' ;
Original file line number Diff line number Diff line change @@ -10,4 +10,5 @@ dependencies:
1010
1111dev_dependencies :
1212 csslib : ^1.0.0
13+ path : ^1.9.1
1314 test : ^1.16.5
Original file line number Diff line number Diff line change 1+ // Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
2+ // for details. All rights reserved. Use of this source code is governed by a
3+ // BSD-style license that can be found in the LICENSE file.
4+
5+ import 'dart:io' ;
6+
7+ import 'package:path/path.dart' as p;
8+ import 'package:test/test.dart' ;
9+
10+ void main () {
11+ test ('all scss files are used from style.scss' , () async {
12+ final references = (await File ('lib/style.scss' ).readAsLines ())
13+ .where ((l) => l.startsWith (r'@use' ))
14+ .map ((l) =>
15+ l.substring (4 ).trim ().split (';' ).first.replaceAll ("'" , '' ).trim ())
16+ .where ((v) => v.isNotEmpty)
17+ .toSet ();
18+ expect (references, isNotEmpty);
19+ expect (references, contains ('src/_tags' ));
20+
21+ final files = await Directory ('lib' )
22+ .list (recursive: true )
23+ .where ((f) => f is File && f.path.endsWith ('.scss' ))
24+ .cast <File >()
25+ .map ((f) => p.relative (f.path, from: 'lib' ))
26+ .map ((n) => n.substring (0 , n.length - 5 )) // without the .scss extension
27+ .toSet ();
28+ files.removeAll (['dartdoc' , 'style' ]);
29+ expect (files, isNotEmpty);
30+ expect (references, files);
31+ });
32+ }
You can’t perform that action at this time.
0 commit comments