K
K
Konstantin Ilyin2017-06-06 13:39:16
gulp.js
Konstantin Ilyin, 2017-06-06 13:39:16

Gulp and multiple sites?

Hello!
I use galp for the first time, tell me please, here I have several sites on vds, ubuntu 16

-site1
--css
--js
--img
--index.php

-site2
--css
--js
--img
--index.php

-site3
--css
--js
--img
--index.php

Each site has its own styles, its own pictures, etc. , i.e. you can say your taxis.
Installed gallp globally. Now we need to install locally. And here questions:
- How it is better to be and where to install? (i.e. with --save-dev command, if in the site* directory, then the node_modules folder will be available on the front)
- How to separate galp files for each site? and is it worth it?
I will be very grateful for examples :)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Egor Zhivagin, 2017-06-06
@kossin17

Usually all the same, its own gulpfile for each site is quite convenient, went to the directory, entered gulp and everything is fine. But nothing prevents you from making distinctions in one file.
The first thing that comes to mind is to make for each site its own "big" task, in which to call the rest of the necessary tasks. Cons: for each new site you will need a separate task. Pros: changes in the structure of one site (and its task) will not affect anything else
Yes, it would be logical to put in site ... But you can, for example, make a structure:

-project
--site1
--- .....
--gulpfile.js

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question