You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering if I could ask for a feature to be added to it.
Could you please add a method to pass a custom processPaths() filter to the plugin?
I was thinking something such as lessPluginGlob.options({filter: myFunc})) in order to pass a function.
reasoning
I need to customize the filter in my gulp workflow for the following reasons:
Using fancy-log instead of console.warn to match the rest of output
Either ignoring the "Here is non-less file:" warnings for some extensions (e.g. *.disabled), or displaying custom messages (e.g. File skipped: <name>.disabled1
Process custom extensions (e.g. *.global-less and *.local-less) as css/less files
1 The reason for this is that I sometimes rename my filename.less to filename.less.disabled in order to exclude it from the glob, without needing to write an exclusion rule.
Here's an example function that I would want to pass:
functionprocessPaths(paths){returnpaths.filter(function(filepath){varext=path.extname(filepath);if(['less','css','custom'].indexOf(ext.replace(/^\./,''))>-1)returntrue;if(ext==='.disabled')logger.warn(chalk`{yellow Less file skipped:} ${filepath}`);elseconsole.warn(chalk`{yellow Here is non-less file:} ${filepath}, {red ignored}`);returnfalse;});}
n.b.
I believe this would be a safe (i.e. non-breaking) change.
The text was updated successfully, but these errors were encountered:
feature request
Thank you for creating this awesome plugin!
I was wondering if I could ask for a feature to be added to it.
Could you please add a method to pass a custom
processPaths()
filter to the plugin?I was thinking something such as
lessPluginGlob.options({filter: myFunc})
) in order to pass a function.reasoning
I need to customize the filter in my gulp workflow for the following reasons:
console.warn
to match the rest of output*.disabled
), or displaying custom messages (e.g.File skipped: <name>.disabled
1*.global-less
and*.local-less
) as css/less files1 The reason for this is that I sometimes rename my
filename.less
tofilename.less.disabled
in order to exclude it from the glob, without needing to write an exclusion rule.Here's an example function that I would want to pass:
n.b.
I believe this would be a safe (i.e. non-breaking) change.
The text was updated successfully, but these errors were encountered: