A
A
Arthur2018-05-16 17:34:37
JavaScript
Arthur, 2018-05-16 17:34:37

How to exclude gulp folder by pattern?

it is not possible to exclude folders when processing gulp'om
as it is correct?
this option doesn't work

gulp.src(['!../folder/*.ru/js/*.js', '!../folder/*.com/js/*.js',  '../folder/**/js/*.js'])

you need to exclude the processing of folders with the ending .ru and the ending .com

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Arthur, 2018-05-18
@cloudz

In order to exclude a folder by a pattern, you must also specify an internal continuation, as is done for regular folders.

'!folder/*.ru/**/test.js',
'!folder/*.com/**/test.js',

R
Ruslan, 2018-05-16
@Sect0R

Maybe put an exception at the end

gulp.src([
'../folder/**/js/*.js',
'!../folder/*.ru/js/*.js', 
'!../folder/*.com/js/*.js'
])

S
Sergey, 2018-05-16
@Hando

Exceptions are recommended to be set first.
Specify the exclusion path from the nesting level of the Gulp file.
That is, if you, for example, have gulpfile at the root, and the project itself is nearby in the app folder, then write:
'!app/js/*.js'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question