Skip to content

Commit 3050ba7

Browse files
committed
Ensure options are passed to plugins
1 parent a1b8242 commit 3050ba7

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,9 @@ function withConfigLoader(cb) {
127127
} else {
128128
configPath = file.dirname
129129
}
130+
contextOptions.file = file
130131
return postcssLoadConfig(
131-
{
132-
file: file,
133-
options: contextOptions
134-
},
132+
contextOptions,
135133
configPath
136134
)
137135
})

test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ describe('PostCSS Guidelines', function () {
329329
stream.on('data', function () {
330330
assert.deepEqual(postcssLoadConfigStub.getCall(0).args[0], {
331331
file: file,
332-
options: { to: 'initial' }
332+
to: 'initial'
333333
})
334334
assert.equal(postcssStub.use.getCall(0).args[0], plugins)
335335
assert.equal(postcssStub.process.getCall(0).args[1].to, 'overriden')

0 commit comments

Comments
 (0)