I did manage to solve it in then end:
.pipe(concat, filename)
.pipe(function() {
return gulpif(enabled.unCss, uncss({
html: require('./sitemap.json'),
ignore: [
'/(#|\.)fancybox(\-[a-zA-Z]+)?/',
'/expanded/',
'/js/',
'/wp-/',
'/align/',
'/admin-bar/',
// needed for Bootstrap's transitions
'.fade',
'.fade.in',
'.collapse',
'.collapse.in',
'.navbar-collapse',
'.navbar-collapse.in',
'.collapsing',
// needed for the `<noscript>` warning; remove them when fixed in uncss
'.alert-danger',
'.visible-xs',
'.noscript-warning',
// currently only in a IE conditional so uncss doesn't see it
// ".close", has error in syntax-opacity
'.alert-dismissible',
'.open',
//theme specific
'/shrink/',
'.navbar-brand-s',
// Woocommerce
'/woocommerce/',
// Flexible
'/module/',
'.mod-default',
'.mod-primary',
'.mod-secondary',
'.mod-white',
'.mod-gray',
'.mod-dark',
'/active/',
'/hover/',
'/after/',
'/before/',
'.popover',
'.popover .arrow',
'.popover-content',
'.popover-title',
'.top',
'.right',
'.left',
'.bottom',
'.arrow',
'clearfix',
'.postbox'.
'.meta-box-sortables',
'.fore',
'.back',
]
}));
})
It wasn’t immediately obvious to me having never used gulp before that it needs to be added to the pipe in this way.
Thanks to @cfx for your help!