A wrapper around PostCSS that processes, caches, and inlines @import
rules
for incremental building
postcss-cached
takes a CSS file and computes a tree of @import
'ed
dependencies. It processes that tree from bottom to top, caching each
individual result. When a file changes, only files that depend on it need to
be rebuilt.
postcss-cached
is available as an
npm package.
postcss-cached
adds to the interface of
postcss as follows:
var postcssCached = require('postcss-cached');
var result = postcssCached().process('css file contents', {from: 'path to css file'});