Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
44adfbf
Implement basic plugin system
adamwathan Feb 27, 2018
1adba9a
Sort imports
adamwathan Mar 1, 2018
ec364b4
Rename selector to rule, extract plugin processing
adamwathan Mar 1, 2018
f3fd078
Remove unnecessary array destructuring
adamwathan Mar 1, 2018
f2030d7
Pass config to plugins
adamwathan Mar 1, 2018
d5592e4
Pass escape function to plugins
adamwathan Mar 1, 2018
530916b
Add atRule helper for plugins
adamwathan Mar 1, 2018
2e361c6
Move processPlugins to separate module
adamwathan Mar 1, 2018
4f9dcc5
Add initial test suite for processPlugins
adamwathan Mar 1, 2018
1a2ea60
Fix style
adamwathan Mar 2, 2018
c8153f7
Expose config as a function to avoid mutation and make it easy to pro…
adamwathan Mar 2, 2018
47178e9
Test that "@" is optional in at-rule definitions
adamwathan Mar 2, 2018
54af380
Test utilities can be added without specifying variants
adamwathan Mar 2, 2018
c4abdfb
Test plugins can add multiple sets of utilities and components
adamwathan Mar 2, 2018
6cc448b
Provide a function for prefixing utilities in plugins
adamwathan Mar 2, 2018
a19a556
Style fixes
adamwathan Mar 2, 2018
8b5f6f1
Add container classes as utilities not components
adamwathan Mar 2, 2018
6aafe5a
Add `utility` helper for creating utility rules that are automaticall…
adamwathan Mar 2, 2018
9b083ee
Inline plugin functions in tests
adamwathan Mar 2, 2018
aa7db12
Style fixes
adamwathan Mar 2, 2018
c83cbc7
Add test to document checking the user's !important preference
adamwathan Mar 5, 2018
ae5b28c
Add plugin comment to default config
adamwathan Mar 5, 2018
c9f3a1d
Fix style
adamwathan Mar 5, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import postcss from 'postcss'
import applyClassPrefix from '../src/util/applyClassPrefix'
import prefixTree from '../src/util/prefixTree'

test('it prefixes classes with the provided prefix', () => {
const input = postcss.parse(`
Expand All @@ -12,7 +12,7 @@ test('it prefixes classes with the provided prefix', () => {
.tw-apple, .tw-pear { color: green; }
`

const result = applyClassPrefix(input, 'tw-').toResult()
const result = prefixTree(input, 'tw-').toResult()
expect(result.css).toEqual(expected)
expect(result.warnings().length).toBe(0)
})
Expand All @@ -36,7 +36,7 @@ test('it handles a function as the prefix', () => {
return ''
}

const result = applyClassPrefix(input, prefixFunc).toResult()
const result = prefixTree(input, prefixFunc).toResult()
expect(result.css).toEqual(expected)
expect(result.warnings().length).toBe(0)
})
Loading