File tree Expand file tree Collapse file tree 3 files changed +36
-1
lines changed Expand file tree Collapse file tree 3 files changed +36
-1
lines changed Original file line number Diff line number Diff line change 9
9
// Local styles and rules.
10
10
@use ' src/_variables' ;
11
11
@use ' src/_base' ;
12
+ @use ' src/_alerts' ;
12
13
@use ' src/_site_header' ;
13
14
@use ' src/_activity_log' ;
14
15
@use ' src/_detail_page' ;
20
21
@use ' src/_report' ;
21
22
@use ' src/_scores' ;
22
23
@use ' src/_search' ;
23
- @use ' src/_staging_ribbon.scss ' ;
24
+ @use ' src/_staging_ribbon' ;
24
25
@use ' src/_tags' ;
25
26
@use ' src/_topics' ;
Original file line number Diff line number Diff line change @@ -10,4 +10,5 @@ dependencies:
10
10
11
11
dev_dependencies :
12
12
csslib : ^1.0.0
13
+ path : ^1.9.1
13
14
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 ('scss files in lib/ are exactly those referenced by style.scss ' ,
12
+ () async {
13
+ final references = (await File ('lib/style.scss' ).readAsLines ())
14
+ .where ((l) => l.startsWith (r'@use' ))
15
+ .map ((l) =>
16
+ l.substring (4 ).trim ().split (';' ).first.replaceAll ("'" , '' ).trim ())
17
+ .where ((v) => v.isNotEmpty)
18
+ .toSet ();
19
+ expect (references, isNotEmpty);
20
+ expect (references, contains ('src/_tags' ));
21
+
22
+ final files = Directory ('lib' )
23
+ .listSync (recursive: true )
24
+ .whereType <File >()
25
+ .where ((f) => f.path.endsWith ('.scss' ))
26
+ .map ((f) => p.relative (f.path, from: 'lib' ))
27
+ .map ((n) => n.substring (0 , n.length - 5 )) // without the .scss extension
28
+ .toSet ();
29
+ files.removeAll (['dartdoc' , 'style' ]);
30
+ expect (files, isNotEmpty);
31
+ expect (references, files);
32
+ });
33
+ }
You can’t perform that action at this time.
0 commit comments