@@ -31,7 +31,6 @@ var warnNodesMessage =
3131function AtImport ( options ) {
3232 options = assign ( {
3333 root : process . cwd ( ) ,
34- async : false ,
3534 path : [ ] ,
3635 skipDuplicates : true ,
3736 } , options || { } )
@@ -98,11 +97,7 @@ function AtImport(options) {
9897 }
9998 }
10099
101- if ( options . async ) {
102- return parsedStylesResult . then ( onParseEnd )
103- }
104- // else (!options.async)
105- onParseEnd ( )
100+ return parsedStylesResult . then ( onParseEnd )
106101 }
107102}
108103
@@ -156,11 +151,7 @@ function parseStyles(
156151 } , atRule . source )
157152 } )
158153
159- if ( options . async ) {
160- return Promise . all ( importResults )
161- }
162- // else (!options.async)
163- // nothing
154+ return Promise . all ( importResults )
164155}
165156
166157/**
@@ -377,21 +368,15 @@ function readImportedContent(
377368 processor
378369 )
379370
380- if ( options . async ) {
381- return parsedResult . then ( function ( ) {
382- return processor . process ( newStyles )
383- } )
384- . then ( function ( newResult ) {
385- result . messages = result . messages . concat ( newResult . messages )
386- } )
387- . then ( function ( ) {
388- insertRules ( atRule , parsedAtImport , newStyles )
389- } )
390- }
391- // else (!options.async)
392- var newResult = processor . process ( newStyles )
393- result . messages = result . messages . concat ( newResult . messages )
394- insertRules ( atRule , parsedAtImport , newStyles )
371+ return parsedResult . then ( function ( ) {
372+ return processor . process ( newStyles )
373+ } )
374+ . then ( function ( newResult ) {
375+ result . messages = result . messages . concat ( newResult . messages )
376+ } )
377+ . then ( function ( ) {
378+ insertRules ( atRule , parsedAtImport , newStyles )
379+ } )
395380}
396381
397382/**
0 commit comments