1

Consider this which checks for JS files in either of two specific locations:

gulp.src( "@(Branch|Main)/*.js" ).pipe( _do-stuff_ )

How does one get which folder was matched (Main or Branch) for the current file(s)?

Lance
  • 861
  • 7
  • 12
  • Depends on what you want to do with that information. – Sven Schoenung Jun 28 '16 at 19:05
  • I need it to change contexts for the build. Ie if in branch, run in debug mode. The example above is only to set up my situation. The src is actually set else where giving me a range of manual and functional means of changing it. – Lance Jun 28 '16 at 19:08
  • Did you ever find a solution for this @Lance? – Liz May 07 '18 at 01:34
  • 1
    Sorry no @Liz, I reworked the logic to avoid the issue. – Lance Jun 06 '18 at 15:04
  • Ah ok, using file.path I managed to figure out a solution that works for me. – Liz Jun 07 '18 at 00:10

0 Answers0