I'm working on a project where others are involved and it's making sense to break CSS modules out into their own individual files and then combine them all into a master modules.css, which in turn is combined with all the other types of CSS.
Anyway, a few lines of code are worth a thousand words:
Firstly, as more of a designer than a developer perhaps this is silly. Second, if it's not silly is it possible? I tried a few different versions of the above with the * to no avail.
This feature is currently not there, but doable. Instead of picking the files directly from the templates, we must first check if the given path is a bundle path and if so pick it as a bundle.
I'll try to find some time to add this feature (if someone else is willing to give it a try, change should happen in this line).
Check out the latest Punch release (v 0.4.11). It gives you the option to define nested bundles (and wildcard paths) as you specified.
Let me know if run into any issues.
Updated the guide with examples of the new feature - https://github.com/laktek/punch/wiki/Asset-Bundles
Awesome! Thanks Lakshan, I'll check it out this week
I updated Punch (via npm update) and I'm unable to get this to work. Here's a real example:
In the above, frameworks.css and module.css are successfully created by Punch. frameworks.css is successfully bundled with compacted versions of normalize.css and foundation.css.
module.css on the other hand is empty, and all.css does not have frameworks.css nor module.css bundled into it.
If I run punch v I get Punch version 0.4.3
Punch version 0.4.3
Anything else I can give you to help?
@collino It seems the version is not right. You will need a version that equal or greater than 0.4.11. Instead of npm update, Can you try installing Punch again with npm install -g punch?
npm install -g punch
npm install -g punch did the trick.