Stoked about Pipes but will they Glob?


#1

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:


#2

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 …


#3

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


#4

: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:


#5

Seconded! :slight_smile:


#6

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


#7

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.




#8

@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.


#9

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:


#10

@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:


#11

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


#12

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


#13

@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…


#14

: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:


#15

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