tailwindcss/src
Geoffrey 0bcd628ec3
Avoid writing to output files when no changes (#6550)
* fix(cli): avoid write same output when no changes

* generalize outputFile

This function will check a cache, it will only write the file if:
- The modified timestamps changed since last time we wrote something.
  This is useful to know if something changed by another tool or
  manually without diffing the full file.
- The contents changed.

* further simplify checks

Turns out that reading files and comparing them is fairly fast and there
is no huge benefit over only using the Stats of the file and keeping
track of that information.

Thanks @kentcdodds!

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2022-01-04 16:29:16 +01:00
..
css Reduce specificity of abbr rule in preflight (#6671) 2021-12-21 10:47:24 -05:00
lib Allow all classes for @apply (#6580) 2022-01-04 14:23:10 +01:00
public Improve warnings (#5666) 2021-10-01 11:47:02 -04:00
util Support HSL with hue units in arbitrary values (#6726) 2021-12-24 13:20:35 -05:00
cli-peer-dependencies.js Improve new JIT-compatible CLI (#4558) 2021-06-04 10:28:09 -04:00
cli.js Avoid writing to output files when no changes (#6550) 2022-01-04 16:29:16 +01:00
constants.js Adds support for tailwind.config.cjs files (#3181) 2021-05-07 13:56:10 -04:00
corePlugins.js Move defaults to their own always-on layer (#6500) 2021-12-14 12:21:38 -05:00
featureFlags.js temporarily disable optimize universal defaults (#6461) 2021-12-13 15:39:18 +01:00
index.js Remove the watching context (#6858) 2022-01-03 17:45:31 +01:00
processTailwindFeatures.js Allow all classes for @apply (#6580) 2022-01-04 14:23:10 +01:00