Y
Y
You can just Eugene2017-07-02 13:36:52
gulp.js
You can just Eugene, 2017-07-02 13:36:52

File masks in Gulp?

Dear experts, does someone have a link to an article with file masks, or if you are not too lazy to make a list of all masks in the comments ... :)
I need to implement a gulp task to concatenate other files, for example:
I have a libs folder in it contains files

libs/
  |-- jquery.min.js
  |-- owl-carousel.min.js
  |-- mobile.file.js
  |-- mobile.file-2.js

I need files from mobile. signed up in bundle.mobile.js , and jquery and owl in bundle.vendor.js
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-07-02
@EM-CODER

minimatch is used there
Do you want it to be beautiful and convenient?
Do not keep third party libraries with your files.
Don't store them in a project at all.
use a package manager. The easiest option is bower.

bower init
bower install --save jquery owl.carousel

Next, create a separate task galpa for building vendor packages. Like this https://github.com/delphinpro/gulp-starter/blob/ma...
And that's it. You collect scripts written by yourself as usual, you collect vendors separately.
An additional benefit is that the reassembly of scripts will be accelerated when changes are made. Third-party libraries often weigh a lot and do not change by you => you do not need to rebuild them for every sneeze.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question