Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "!" mean in file paths?

Tags:

gulp

I am reading over someone's gulpfile.js that I found, and came across an interesting character that I've not seen in file paths before; the ! symbol. I tried to do some searches for this but yielded nothing.

gulp.task("min:js", function () {
    gulp.src([paths.js, "!" + paths.minJs], { base: "." })
        .pipe(concat(paths.concatJsDest))
        .pipe(uglify())
        .pipe(gulp.dest("."));
});

Does the ! have some particular meaning, here?

like image 827
Ciel Avatar asked Sep 25 '15 22:09

Ciel


1 Answers

I'm not an expert on Gulp, but a quick search shows that it tells gulp to ignore a given path.

Prepending a path with an exclamation mark tells Gulp to exclude that directory.

So, in your example, paths.minJs should be excluded from the task Gulp is performing.


Actually it is used to negate a pattern, based on the answer to another question. That is, it is used to select what does not match the following pattern. As a consequence, it ignores the path in the pattern.

like image 99
afsantos Avatar answered Oct 18 '22 03:10

afsantos