File tree 2 files changed +8
-28
lines changed
2 files changed +8
-28
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,14 @@ function AtImport(options) {
63
63
typeof options . addDependencyTo === "object" &&
64
64
typeof options . addDependencyTo . addDependency === "function"
65
65
) {
66
+ console . warn ( [
67
+ "addDependencyTo is deprecated in favor of" ,
68
+ "result.messages.dependency; postcss-loader >= v1.0.0 will" ,
69
+ "automatically add your imported files to webpack's file watcher." ,
70
+ "For more information, see" ,
71
+ "https://github.com/postcss/postcss-import\
72
+ #dependency-message-support" ,
73
+ ] . join ( "\n" ) )
66
74
Object . keys ( state . importedFiles )
67
75
. forEach ( options . addDependencyTo . addDependency )
68
76
}
Original file line number Diff line number Diff line change @@ -25,34 +25,6 @@ test("should have a callback that returns an object" +
25
25
} )
26
26
} )
27
27
28
- test ( "should have a callback shortcut for webpack" , t => {
29
- var files = [ ]
30
- var webpackMock = {
31
- addDependency : file => {
32
- files . push ( file )
33
- } ,
34
- }
35
-
36
- return postcss ( )
37
- . use ( atImport ( {
38
- path : "fixtures/imports" ,
39
- addDependencyTo : webpackMock ,
40
- } ) )
41
- . process ( readFileSync ( "fixtures/media-import.css" ) , {
42
- from : "fixtures/media-import.css" ,
43
- } )
44
- . then ( ( ) => {
45
- t . deepEqual (
46
- files ,
47
- [
48
- resolve ( "fixtures/media-import.css" ) ,
49
- resolve ( "fixtures/imports/media-import-level-2.css" ) ,
50
- resolve ( "fixtures/imports/media-import-level-3.css" ) ,
51
- ]
52
- )
53
- } )
54
- } )
55
-
56
28
test ( "should add dependency message for each import" , t => {
57
29
return postcss ( )
58
30
. use ( atImport ( {
You can’t perform that action at this time.
0 commit comments