File tree Expand file tree Collapse file tree 3 files changed +0
-33
lines changed Expand file tree Collapse file tree 3 files changed +0
-33
lines changed Original file line number Diff line number Diff line change @@ -133,14 +133,6 @@ Default: `undefined`
133133
134134An array of plugins to be applied on each imported files.
135135
136- #### ` onImport `
137-
138- Type: ` Function `
139- Default: ` null `
140-
141- Function called after the import process. Take one argument (array of imported
142- files).
143-
144136#### ` resolve `
145137
146138Type: ` Function `
Original file line number Diff line number Diff line change @@ -63,10 +63,6 @@ function AtImport(options) {
6363 applyRaws ( bundle )
6464 applyMedia ( bundle )
6565 applyStyles ( bundle , styles )
66-
67- if ( typeof options . onImport === "function" ) {
68- options . onImport ( Object . keys ( state . importedFiles ) )
69- }
7066 } )
7167 }
7268}
Original file line number Diff line number Diff line change @@ -9,27 +9,6 @@ import postcss from "postcss"
99// plugin
1010import atImport from ".."
1111
12- test ( "should have a callback that returns an object" +
13- " containing imported files" , t => {
14- return postcss ( )
15- . use ( atImport ( {
16- path : "test/fixtures/imports" ,
17- onImport : files => {
18- t . deepEqual (
19- files ,
20- [
21- resolve ( "test/fixtures/media-import.css" ) ,
22- resolve ( "test/fixtures/imports/media-import-level-2.css" ) ,
23- resolve ( "test/fixtures/imports/media-import-level-3.css" ) ,
24- ]
25- )
26- } ,
27- } ) )
28- . process ( readFileSync ( "test/fixtures/media-import.css" ) , {
29- from : "test/fixtures/media-import.css" ,
30- } )
31- } )
32-
3312test ( "should add dependency message for each import" , t => {
3413 return postcss ( )
3514 . use ( atImport ( {
You can’t perform that action at this time.
0 commit comments