Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: use different functions for different code blocks #21

Open
rowild opened this issue Feb 7, 2018 · 3 comments
Open

Question: use different functions for different code blocks #21

rowild opened this issue Feb 7, 2018 · 3 comments

Comments

@rowild
Copy link

rowild commented Feb 7, 2018

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!

@jonkemp
Copy link
Owner

jonkemp commented Feb 8, 2018

Sounds like you don't need to use useref for the vendor-js task. But I guess you could use useref for each task.

@rowild
Copy link
Author

rowild commented Feb 8, 2018

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

@jonkemp
Copy link
Owner

jonkemp commented Feb 8, 2018

Oh, I suppose custom blocks might work, but yeah there's not another way to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants