F
F
freeman02042016-04-10 15:19:43
css
freeman0204, 2016-04-10 15:19:43

How to use your layout templates automatically?

I created several files (templates) for myself, where the frequently occurring parts of the site are already ready. Usually I link such code to snippets (but this is not very convenient), I will not go deep.
Started learning gulp.
What I want.
Now I have split the main.css file into several files. I will write styles for each block in a separate css file, and gulp will connect them. The template files themselves contain html, css, js. It is necessary that the code from the template is written to the right place (to a file) in my project.
Is this possible with gulp?
And another question on gulp. Is it possible to split index.html in the same way and write each block in a separate html file and gulp will connect them into index.html (this is all local)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Wernalur, 2016-04-10
@freeman0204

Yes, html include is possible in at least two ways:
1) Use a plugin like gulp-file-include
2) Use Jade or some other template engine.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question