Skip to content

Commit 23216ac

Browse files
committed
Fix misplacing plugin config
1 parent a974c4f commit 23216ac

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

index.test.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ const { generatePluginCss } = require('@hacknug/tailwindcss-plugin-utils')
33

44
expect.extend({ toMatchCss: require('jest-matcher-css') })
55

6+
const plugin = require('./index.js')
7+
const pluginOptions = {}
8+
69
const commonConfig = {
710
theme: {
811
screens: { 'sm': '640px' },
@@ -24,6 +27,7 @@ const commonConfig = {
2427
},
2528
},
2629
corePlugins: false,
30+
plugins: [plugin(pluginOptions)],
2731
}
2832

2933
test('generates default utilities', () => {
@@ -187,9 +191,9 @@ test('variants can be customized', () => {
187191
return generatePluginCss(tailwindConfig, testConfig).then(css => expect(css).toMatchCss(expectedCss))
188192
})
189193

190-
191194
test('utilities can be customized', () => {
192195
const testConfig = {
196+
...commonConfig,
193197
theme: {
194198
textFillColor: theme => ({
195199
transparent: 'transparent',

tailwind.config.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
const plugin = require('./index.js')
2-
const pluginOptions = {}
3-
41
module.exports = {
52
theme: {
63
paintOrder: {
@@ -12,6 +9,4 @@ module.exports = {
129
'msf': 'markers stroke fill',
1310
},
1411
},
15-
16-
plugins: [plugin(pluginOptions)],
1712
}

0 commit comments

Comments
 (0)