This repository was archived by the owner on Oct 30, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 30
30
" css modules webpack typings"
31
31
],
32
32
"dependencies" : {
33
+ "colour" : " 0.7.1" ,
33
34
"css-loader" : " >=0.23.1" ,
34
35
"graceful-fs" : " 4.1.4" ,
35
36
"loader-utils" : " 0.2.16"
Original file line number Diff line number Diff line change 1
1
import cssLoader from 'css-loader' ;
2
2
import cssLocalsLoader from 'css-loader/locals' ;
3
3
import loaderUtils from 'loader-utils' ;
4
+ import 'colour' ;
5
+
4
6
import {
5
7
filterNonWordClasses ,
6
8
generateNamedExports ,
@@ -23,7 +25,7 @@ module.exports = function(input) {
23
25
const query = loaderUtils . parseQuery ( this . query ) ;
24
26
const moduleMode = query . modules || query . module ;
25
27
if ( ! moduleMode ) {
26
- console . warn ( 'Typings for CSS-Modules: option `modules` is not active - skipping extraction work...' ) ;
28
+ console . warn ( 'Typings for CSS-Modules: option `modules` is not active - skipping extraction work...' ) . red ;
27
29
return delegateToCssLoader ( ctx , input , callback ) ;
28
30
}
29
31
@@ -42,8 +44,8 @@ module.exports = function(input) {
42
44
if ( skippedDefinitions . length > 0 && ! query . camelCase ) {
43
45
console . warn ( `Typings for CSS-Modules: option 'namedExport' was set but 'camelCase' for the css-loader not.
44
46
The following classes will not be available as named exports:
45
- ${ skippedDefinitions . map ( sd => ` - "${ sd } "` ) . join ( '\n' ) }
46
- ` )
47
+ ${ skippedDefinitions . map ( sd => ` - "${ sd } "` ) . join ( '\n' ) . red }
48
+ ` . yellow ) ;
47
49
}
48
50
cssModuleDefinition = generateNamedExports ( cleanedDefinitions ) ;
49
51
}
You can’t perform that action at this time.
0 commit comments