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

gulp move files to parent directory
How to get gulp-jshint to ignore folders
Inserting specific file at index of a stream
How to pass array from gulp to other js files?
BrowserSync + Gulp with Vagrant not refreshing
gulp-tslint return undefined when required
Gulp watch only runs once
Gulp watch not working with imported files but works with main file
Gulp watch for css doesn't work
Using gulp for compiling of changed files only
How to run gulp task in visual studio code?
BrowserSync with custom URL
Multi-tenancy and Semantic UI
Display total number of errors with Gulp Jshint
Gulp watch entire folder & compile saved file
elixir.queueTask is undefined

Categories

HOME
asterisk
formatting
microcontroller
dronekit
window.open
opacity
pyodbc
ejb-3.0
ethereum
select2
aws-sdk-cpp
velocity
distinct
yui
openscad
cucumberjs
md2
descriptor
screen-scraping
wai-aria
android-wear-2.0
spock
pypy
kundera
andengine
multilanguage
wordpress-rest-api
geocomplete
asp.net-webhooks
ragel
leaderboard
kepserverex
framebuffer
scalamock
ssdp
nshttpurlresponse
cakephp-3.2
spring-ide
anonymous-function
px4
sp
typewriter
totalview
blackberry
pyautogui
scanf
breadcrumbs
blitz3d
directinput
scikit-image
strtol
access-violation
objectify
transaction-isolation
boost-propertytree
periodic-processing
custom-build-step
clear
github-for-mac
android-facebook
hexagonal-tiles
joomla3.3
p4python
stereotype
fileinputstream
bungeecord
beagleboard
chrome-mobile
random-access
diffmerge
formbuilder
worklight-appcenter
ant-contrib
starling-framework
vbaccelerator
nokogiri
record-locking
qgraphicsscene
outlook-object-model
codeigniter-form-helper
ntdll
derived-class
custom-cursor
optimistic-concurrency
sqlbuddy
maven-eclipse-plugin
cinder
xslt-grouping
cons

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