You can use the above 2 files to create dynamically generated atomic CSS files
I only added pug and React support but it would be very easy to add more
Say you have this file structure. You can use the above config to get all CSS classes defined in your app.jsx file and views files that match a key in the config.yaml file and build a CSS file that has only the used classes
.
├── gulpfile.js
├── config.yaml