Stoked about Pipes but will they Glob?

I’m very excited about Hugo Pipes, as I have a GulpJS workflow at the moment that does very simple PostCSS processing, minification and image optimisation.

The one thing I’m not sure that you can do yet is globbing, the ability to match sets of filenames with a wildcard, eg:

const paths = {
	css: [
    './src/modules/objects/**/*.css',

It would be super awesome if this were the case, really looking forward to the documentation :slightly_smiling_face:

They can, but only for assets inside bundles in /content. We have scetched out a resources.Match func, too, what will take wildcards, but that is not implemented …

1 Like

That said, CSS globbing was and is not the first use case I think about …

1 Like

:laughing: Modular CSS has been around for a while - SMACSS, BEM etc - I first used CSS globbing with a Ruby SSG about 5 years ago. Couldn’t live without it now!

Looking forward to the resources.Match func :slight_smile:

1 Like

Seconded! :slight_smile:

1 Like

Why not use PostCSS for pulling in modular css? postcss-import is one useful module.

1 Like

That would be super cool, I didn’t realise there was such a module for PostCSS (I just use really basic functionality). Would mean I could ditch the separate Gulp task, which would be neater and fasterer.



@growdigital I’m sitting here trying to reimplement my own postcss toolchain using pipes right now :slight_smile: Not currently working :confused: - but that’s another issue.

1 Like

It would be great if you had any public repos I could have a look at, help get me up to speed :slightly_smiling_face:

@growdigital WIP is here https://github.com/adrinux/Pippy
But it’s non functional for me at present - even just using postcss-cli in a shell returns "Plugin Error: Cannot find module ‘postcss-import’’ so problem is with node and node_modules rather than hugo. Works running from gulp in another project :frowning:

1 Like

Thanks for the link. I’ll try to have a look later to see if I can help out at all :slightly_smiling_face:

@growdigital Thanks. Some improvement now - seems to process files but out it not processed. So still no working import.

@growdigital Sorted. Apparently I a wrote @include instead of @import :man_facepalming:
I’m blaming vscode :slight_smile:
Now it cant find the imports when run via hugo, but can on cli…

1 Like

:laughing: vscode is like that, inserts all sorts of nonsense into my perfectly crafted files

Will fire up a copy later on :slightly_smiling_face:

Separate topic here Pipes, postCSS & postcss-import - how to keep filesystem context

1 Like