Generate a cache file, such as assets/icons/.sprites-cache.json (configurable), after a build or rebuild.
The user could persist the cache file in local history or GIT.
When a cache file exists, only regenerate the sprites that have changed.
Delete expired artifacts during a build or rebuild.
Problems
The primary issue is a large number of icons without regular updates.
In this scenario, users will wait for seconds without any benefit.
The secondary issue is the inability to clean previous build artifacts, which can be encountered in watch mode or during multiple builds with different icons.
As a result, users will see the following picture:
Notes
The caching mechanism should be shared with @neodx/figma.
Expected behavior
assets/icons/.sprites-cache.json
(configurable), after a build or rebuild.Problems
The primary issue is a large number of icons without regular updates. In this scenario, users will wait for seconds without any benefit.
The secondary issue is the inability to clean previous build artifacts, which can be encountered in watch mode or during multiple builds with different icons. As a result, users will see the following picture:
Notes
The caching mechanism should be shared with
@neodx/figma
.