M
M
Maxim2016-01-14 20:32:20
JavaScript
Maxim, 2016-01-14 20:32:20

What is the best way to process js files in gulp?

Now, for example, for gluing and minifying js, I manually write each individual file in the right order. But not sure if this is the right way.
And is it worth gluing plugin files together with the rest?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
Kostya Gorozhanov, 2016-01-14
@webmaxer

m.habrahabr.ru/post/250569
Look at this article, it will be very useful.

N
Nicholas, 2016-01-14
@healqq

In order not to register all files with pens, you can use wildcards.
For vendors, I usually make a separate variable in which I write all the paths to vendors.
As for konkat and mimifai vendors:
I will konkat into a separate file, because it is updated much less frequently than the script file and as a result it can be loaded from the cache.

V
Viktor Login, 2016-01-14
@BATAZOR

I use webpack plugin for gulp to glue js files. This allows you to use commonJS (AMD, etc) and specify only the main file(s), the rest of the files will pull themselves up.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question