File tree Expand file tree Collapse file tree 2 files changed +3
-28
lines changed Expand file tree Collapse file tree 2 files changed +3
-28
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,9 @@ function AtImport(options) {
6363 typeof options . addDependencyTo === "object" &&
6464 typeof options . addDependencyTo . addDependency === "function"
6565 ) {
66+ console . warn (
67+ "Don't use addDependencyTo; posstcss-loader does this for you"
68+ )
6669 Object . keys ( state . importedFiles )
6770 . forEach ( options . addDependencyTo . addDependency )
6871 }
Original file line number Diff line number Diff line change @@ -25,34 +25,6 @@ test("should have a callback that returns an object" +
2525 } )
2626} )
2727
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-
5628test ( "should add dependency message for each import" , t => {
5729 return postcss ( )
5830 . use ( atImport ( {
You can’t perform that action at this time.
0 commit comments