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

What is the purpose(s) of JavaScript build tools
gulp-jshint utters errors when using browserify
Gulp “watch” is not running the sub task “sass” on file change
Proxy URL not working with BrowserSync Gulp task
the task can't be called by watch module.
I can't get the data-uri() function to work on gulp.js to base64 an image on mac
How to inject bower dependencies in karma.conf.js file with gulp?
Getting Libsass Gulp Susy to work together
Gulp compass without config.rb
gulp-webserver: Default to index.html if available, else show directories
gulp-uglify notify on failing build
Declaring optional dependencies
gulp html minification error
Can an IIFE be added to a browserify bundle?
Gulp: Error Messages and Notifications with Plumber
Gulp - gulp-load-plugins not working

Categories

HOME
drupal
system-calls
dronekit
gap-system
snmp
confluence-rest-api
country-codes
python-3.4
markdown
webpack-dev-server
theory
guidewire
tracking
mbed
repeater
appsettings
nsoperation
greensock
lotusscript
javaagents
sasl
utc
bytebuffer
angular-schema-form
request-uri
openoffice-impress
arp
multilanguage
restler
matlab-compiler
odp.net
geocomplete
pymunk
repeat
leaderboard
respect-validation
mongoid5
matrix-multiplication
stencyl
motion
vertical-alignment
rexx
amazon-rds-aurora
chrome-custom-tabs
jks
serverless-architecture
monaca
beanshell
openpgp.js
htop
scrollmagic
group
nls
stripes
firebase-job-dispatcher
papyrus
x12
altova
disconnect
queuing
web-optimization
trendline
dcg
esb-toolkit-2.1
beagleboard
asp.net-2.0
nexusdb
cocos2d-x-2.x
serializer
angular-file-upload
rda
class-library
object-oriented-database
pthreads-win32
starling-framework
nop
adabas
typography
codeigniter-form-helper
ftpwebrequest
yii-components
gssapi
nude.js
reflexil
win-prolog
jqueryi-ui-buttonset
funambol
sipdroid
time-management
unauthorized

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