G
G
game8022017-04-09 16:24:00
Web development
game802, 2017-04-09 16:24:00

How to implement css and js insertion in html, in gulp?

Good afternoon dear experts. I have been struggling with gulp plugins for the implementation of inserting js and css into html for the past day.
What I tried to do:
1) Using gulp-inline-css did not lead to any expected result. Everything is fine, but he doesn’t want to work with media queries, even when passing true to the options.preserveMediaQueries parameter , I’m not talking about the fact that he doesn’t want to save the paths to the pictures / sprites that were in the original css file in every possible way (decided using base64)
2) Using gulp-inline-sourceleads to nothing at all. The file in its original state from the file passed through this plugin does not lead to anything at all. I have not tried any config writing options, everything comes down to the same (nothing)
etc ....
Dear sirs, what should I do in this situation? The question is to just stupidly insert css and js into index.html, not by manual injection, but by using a assembler. How to implement it? I would be glad for any help ... Thank you for your attention!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey delphinpro, 2017-04-09
@game802

Be simple, the task is primitive - gulp-rigger

в html
<style>
//= css/style.css
</style>
<script>
//= js/scripts.js
</script>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question