44 Commits

Author SHA1 Message Date
Adam Wathan
d82a7556c0 Preserve units for zero value properties 2018-08-14 13:37:08 -04:00
Adam Wathan
7201c4f51b Rename lazyConfig to getConfig 2018-07-16 08:37:23 -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
Benoît Rouleau
46058cf6c8 accept config as a js object 2018-06-22 21:01:18 -04:00
Adam Wathan
5f77aa0ec3 Implement basic plugin system 2018-03-05 09:58:35 -05:00
Adam Wathan
f4c905fcef Tweak Perfectionist configuration 2018-01-22 10:01:22 -05:00
Keith Damiani
eea8b54dfe Run perfectionist at end of PostCSS chain in place of stylefmt 2018-01-19 14:39:56 -05:00
Adam Wathan
704396b892 Remove hoverable and focusable at-rules in favor of variants at-rule 2017-11-24 15:11:16 -05:00
Adam Wathan
f84507457f Extract mergeConfigWithDefaults for easier testability 2017-11-24 12:34:09 -05:00
Adam Wathan
8171ca79ff Rename substitutePreflight to substituteTailwindPreflight 2017-11-23 15:04:21 -05:00
Adam Wathan
62a9894a53 Rename generateUtilities to substituteTailwindUtilitiesAtRules 2017-11-23 15:02:55 -05:00
Adam Wathan
0a6c4cc5c6 Use @variants to generate variants specified in config
...instead of using variant generators directly.
2017-11-23 12:01:04 -05:00
Adam Wathan
9202ecf104 Merge user config with default config
Not recursively so values won't get combined, but missing keys will get
their default values which makes upgrading a non-breaking change if we
add new options.
2017-11-23 11:16:44 -05:00
Adam Wathan
fc0e99e598 Fix style errors 2017-11-17 10:50:14 -05:00
Adam Wathan
8f3e80e961 Throw error when trying to access defaultConfig the deprecated way to be nice guys 2017-11-17 10:37:57 -05:00
Jonathan Reinink
1faabc82b1 Switch to separate config import
Import default config from separate path (require('tailwindcss/defaultConfig')) to allow importing the default config without importing all of Tailwind, which causes errors with Webpack due to a dynamic require.
2017-11-14 08:03:31 -05:00
David Hemphill
79a2bb39e5 Reformat files 2017-11-06 15:02:02 -05:00
David Hemphill
9dbf5881cd fix eslint issues 2017-11-06 15:00:55 -05:00
David Hemphill
ec607968cf Add ESLinting and Prettier formatting and run an initial format on the codebase 2017-11-06 15:00:00 -05:00
Adam Wathan
b2b95d5738 Register config file with Webpack for watching
This change tells Webpack (for those using it) that the config file
used should be tracked as a dependency and that the CSS should be
re-compiled if that config file changes.

It's careful to make sure the config file is loaded fresh every single
time to avoid weird caching issues.
2017-11-03 09:54:15 -04:00
Jonathan Reinink
2b1a6959d3 Rename "reset" to "preflight" 2017-10-31 17:05:10 -04:00
Jonathan Reinink
f26833c2a3 Fix defaultConfig() method (add return) 2017-10-26 10:21:13 -04:00
Jonathan Reinink
24199b140f Lazy load default config 2017-10-26 09:29:52 -04:00
Adam Wathan
4478b04090 Don't do any merging of config values at all
Leave this up to the user; their config file is a JS file and we give
them access to the default config, so they can do as much merging of
defaults as they like.
2017-10-24 12:13:25 -04:00
Adam Wathan
fcee129eb8 Merge pull request #205 from nothingworksinc/export-config
Add default config to module.exports
2017-10-24 08:53:22 -04:00
Adam Wathan
244d7c09c9 Move defaultConfig to root so it's not processed by Babel 2017-10-24 07:39:09 -04:00
Adam Wathan
8f3ad0f8e4 Add default config to module.exports 2017-10-24 07:33:24 -04:00
Adam Wathan
efe678ddf3 Add focusable at-rule
Allows you to wrap up classes to easily generate `.focus:{class}`
variants.
2017-10-21 11:15:25 -04:00
Adam Wathan
18f4e650bd Support passing config as a path
Let's you do tailwind('config.js') instead of
tailwind(require('config.js')) when registering Tailwind as a PostCSS
plugin.
2017-10-15 17:10:25 -04:00
Adam Wathan
09a56e794f Rename 'breakpoint' features to 'screens', support for 'raw' key 2017-10-13 11:39:55 -04:00
Adam Wathan
ba04169e4e Add support for "tailwind" function to look up config values 2017-10-09 10:42:19 -04:00
Adam Wathan
1da5eb4d4c Add @tailwind-reset rule
...with basic reset support.

Might want to rename the rule because of that annoying Less issue where
it fails without any parameters, like `@tailwind reset` or something.
Super G and inconsistent with `@tailwind-utilities all` though. Who
knows.
2017-10-07 17:59:28 -04:00
Adam Wathan
decd9e0334 Revert "Allow passing config as lazy-evaluated function"
This reverts commit 1819cf67d3f24ebe055b4c54b4e037a6621b3734.
2017-10-07 11:36:56 -04:00
Adam Wathan
9d96d0c574 Revert "Make config loading even lazier"
This reverts commit be7f9963eab041026853df68c4b9eeed46bf730d.
2017-10-07 11:36:33 -04:00
Adam Wathan
be7f9963ea Make config loading even lazier 2017-10-07 11:20:57 -04:00
Adam Wathan
082fd3a389 Remove dependency on CSSNext 2017-10-06 15:31:45 -04:00
Adam Wathan
1819cf67d3 Allow passing config as lazy-evaluated function 2017-10-06 15:24:35 -04:00
Adam Wathan
05b4d962d1 Add support for @breakpoint rule 2017-10-05 20:23:17 -04:00
Adam Wathan
16a5bd6114 Add support for merging and replacing config keys from a single config file 2017-09-02 07:41:55 -04:00
David Hemphill
615a1264f4 update project entry point 2017-08-28 15:02:50 -05:00
David Hemphill
d1f345fafc Move the CLI to a different file 2017-08-28 15:02:22 -05:00
David Hemphill
dd2ffec934 Allow using a custom config with option to replace instead of default merging 2017-08-28 12:55:53 -05:00
David Hemphill
9cfe3aa25d Add command to process with tailwind from file with custom json config 2017-08-27 23:07:55 -05:00