gulp


What is the ** glob character?


I have this path in my react gulpfile:
var path = {
HTML: 'src/index.html',
ALL: ['src/js/*.js', 'src/js/**/*.js', 'src/index.html'],
JS: ['src/js/*.js', 'src/js/**/*.js'],
MINIFIED_OUT: 'build.min.js',
DEST_SRC: 'dist/src',
DEST_BUILD: 'dist/build',
DEST: 'dist'
};
What is the double glob character?
I know what the single glob is... but what is the double?
single glob
It's almost the same as the single asterisk but may consist of multiple directory levels.
In other words, while /x/*/y will match:
/x/a/y
/x/b/y
and so on (only one directory level in the wildcard section), the double asterisk /x/**/y will also match things like:
/x/any/number/of/levels/y
As an aside, as much as I hate to credit the mainframe with anything, I believe this has been used since the earlist days of MVS to allow selection of datasets at multiple levels.
It's usually used to indicate any number of subdirectories. So
src/js/**/*.js
Would match
src/js/files/*.js
src/js/more-files/*.js
etc
etc
Like Grunt, the double ** is saying, "Look in all the subfolders
within js and for all of the .js files."
You can actually refer here for the same:
https://www.codefellows.org/blog/quick-intro-to-gulp-js
** matches any character (-> any directory), * is here used only to match any character except / (to match just the file or directory name).

Related Links

Browserify - accurate build log in terminal with o: --colors, silimar to webpack
Minimist not finding arguments
Gulp.js. Same task on watch, with different parallel tasks
Split css for different devices
Gulpfile not working when module.exports references a Gulp task not a function?
Use gulp to process bowser files
Getting an error when trying to serve the app using browser-sync
Can't Sprite using gulp.spritesmith
How can I make build variables available to all JS files in gulp?
Gulp not installed globally?
gulp-useref deep folders error
use gulp+browserify+reactify, can't emit exit when got a ReactifyError
gulp-browserstack and gulp-cucumber don't seem to play nicely together
Gulp - Babel - EcmaScript-6 - Redux / Unhandled stream error in pipe
Delete all files using gulp except once that match pattern
Gulp task 'inject:vendor' does not inject Bower dependencies

Categories

HOME
oop
kendo-ui-angular2
azure-documentdb
azure-active-directory
marie
microcontroller
latex
stdout
lithium
download
country-codes
pip
restheart
rtc
guidewire
cakephp-2.0
swift3.1
web-parts
ofbiz
turn.js
smali
quality-center
rollupjs
jopendocument
multiple-inheritance
marionette
sqldependency
request-uri
semantic-ui-react
qt-designer
flickr
tunnel
wunderground
pymunk
stochastic-process
console.readline
motion
icu
hierarchical-clustering
e4
htop
sharpssh
stringbuilder
alfred
qtruby
php-java-bridge
innertext
cexception
video-embedding
trendline
nonblocking
controlpanel
bioconductor
serial-communication
persian
android-togglebutton
bootstrap-tabs
borland-c++
targetprocess
gcc-warning
maven-archetype
data-quality-services
crtdbg.h
breeze-sharp
nsnotificationcenter
disparity-mapping
amzi-prolog
winrun4j
iwork
node-amqp
code-complete
setcookie
rfc822
orchestration
inflate
mail-gem
nsscrollview
inserthtml
sessiontracking
cpack
lgpl
datarelation
webdb
opengl-to-opengles
user-preferences
asp.net-1.1

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App