22 Commits

Author SHA1 Message Date
Adam Wathan
95bb283a69 Rename defaultPlugins to corePlugins 2019-02-01 12:32:50 -05:00
Adam Wathan
fd22dea5ad Always load core plugins by default 2019-02-01 12:32:50 -05:00
Adam Wathan
2f9172cf8d Update every plugin to accept its config as a parameter 2019-02-01 12:32:50 -05:00
Adam Wathan
ffae87148d Revert "Allow plugins to register new config variables" 2019-02-01 12:32:04 -05:00
Adam Wathan
5ea8bbe798 Allow plugins to register new config variables 2019-02-01 12:32:04 -05:00
Adam Wathan
adc5d2597c Remove unnecessary parameter 2019-01-14 15:43:12 -05:00
Adam Wathan
060d23439d Remove code obsoleted by upgrading PostCSS 2019-01-14 15:43:12 -05:00
Adam Wathan
f01d79f76b Add a comment to explain performance optimization 2019-01-14 15:43:12 -05:00
Adam Wathan
5ade923fa4 Fix tests and lint warnings 2019-01-14 15:43:12 -05:00
Adam Wathan
eeb42cd6bb Provide our own rawCache to avoid performance issues 2019-01-14 15:43:12 -05:00
Adam Wathan
5b3d6d8861 Port objectPosition module to plugin, conditionally load plugins based on modules config 2019-01-14 15:43:12 -05:00
Adam Wathan
027b69c7e8 Port width and whitespace modules to plugins 2019-01-14 15:43:12 -05:00
Adam Wathan
6352843cde Port zIndex module to default plugin 2019-01-14 15:43:12 -05:00
Adam Wathan
146b984617 Accept plugins as separate processPlugins arg 2019-01-14 15:43:12 -05:00
Adam Wathan
7201c4f51b Rename lazyConfig to getConfig 2018-07-16 08:37:23 -04:00
Adam Wathan
c0adb29f27 Be more defensive about fetching input source file 2018-07-16 08:35:58 -04:00
Adam Wathan
91286ad6bf Process all Tailwind features as one big plugin 2018-07-16 08:30:57 -04:00
Adam Wathan
80baf4aa17 Pass generated utilities around as array instead of root
When you do something like container.before(someRoot), PostCSS actually *mutates* someRoot, leaving it empty and moving its contents before the container. container.before(arrayOfNodes) on the other hand does no weird mutation.

This PR makes sure generatedUtilities is an array of nodes instead of a PostCSS container to avoid this unexpected mutation. It makes it a bit more work to walk those nodes if they need to be transformed, but I think it's worth the trade-off. Can always write a helper function around that if the boilerplate starts to feel repetitive.
2018-07-11 19:14:33 -04:00
Adam Wathan
cfe492220c Refactor duplication 2018-07-11 11:45:45 -04:00
Adam Wathan
cdbea36564 Fallback to shadow table 2018-07-11 09:56:11 -04:00
Adam Wathan
9b22ff3513 Only process plugins once 2018-06-26 13:44:47 -04:00
Adam Wathan
b21d258f63 Wrap Tailwind plugins in new plugin to only unwrap config once 2018-06-26 13:44:47 -04:00