useref
useref copied to clipboard
Question: use different functions for different code blocks
In my case, i have a js block with vendor files, all in ES5 and already ugli-/minified. They only need to be concatenated and renamed to a "vendor.js" file using a simple gulp-concat() command in a separate gulp-task "vendor-js".
In a second block, though, I have my own stuff, written in ES2015. This block needs a different gulp task, with babel enabled, to transpile them to ES5 again. The gulp task is called "js-es6".
My question: is it possible to tell useref to use one process for "vendor-js" and one for "js-es6"?
Thank you!
Sounds like you don't need to use useref for the vendor-js task. But I guess you could use useref for each task.
@jonkemp Well, during development vendor libs will be added or removed, and in some cases order matters. Organising them in one central place would be a great advantage. - How would you tell useref to use separate tasks for each HTML block defined?
Oh, I suppose custom blocks might work, but yeah there's not another way to do that.