A
A
Andrej Sharapov2020-07-18 18:20:00
gulp.js
Andrej Sharapov, 2020-07-18 18:20:00

Exclude format in Gulp 4?

tell me how to exclude certain formats when building in gulp 4?

function build() {
  return gulp
    .src([
      `${PATHS.doc}/**/*.*`,
      `${PATHS.pic}/**/*.*`
    ])
    .pipe(gulp.dest("./dist/"));
}


In the code above , the .pdn, .psd, .ai${PATHS.pic}/**/*.* formats must be excluded from the folder. It works like this:
`!${PATHS.pic}/**/*.psd`, `!${PATHS.pic}/**/*.gif`,

but maybe there is a better option?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Alexander Viktorovich, 2020-07-20
@Madeas

[
    `${PATHS.doc}/**/*.*`,
    `${PATHS.pic}/**/*.*`,
    `!${PATHS.pic}/**/*.+(pdn|psd|ai)`
]

or like this (not tested)
https://github.com/gulpjs/glob-parent
[
    `${PATHS.doc}/**/*.!(pdn|psd|ai)`,
    `${PATHS.pic}/**/*.*`
]

or
https://gulpjs.com/docs/en/api/src/#options
function build() {
  return gulp.src([
    `${PATHS.doc}/**/*.*`,
    `${PATHS.pic}/**/*.*`
    ],{
      ignore: `${PATHS.pic}/**/*.+(pdn|psd|ai)`
    })
    .pipe(gulp.dest("./dist/"));
}

F
Fyodor Buzinov, 2015-12-30
@Feduch

This line
is obtained with

iptables -L -t nat                                                                                                          
Chain PREROUTING (policy ACCEPT)                                                                                                                                                           
target     prot opt source               destination                                                                                                                                       
REDIRECT   tcp  --  anywhere            !192.168.1.1

and the second one will not work in nat, the DROP action is not supported in the nat table

3
3vi1_0n3, 2015-12-29
@3vi1_0n3

If you have such a configuration and you want to view it in the form of rules, then use
If you save to a file, then
you can load from the file with the command
iptables-restore < file

E
Ergil Osin, 2015-12-29
@Ernillew

Well, you already have them, why should you prescribe?
iptables-save will show them to you in the line for the iptables command

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question