File tree Expand file tree Collapse file tree 4 files changed +44
-2
lines changed Expand file tree Collapse file tree 4 files changed +44
-2
lines changed Original file line number Diff line number Diff line change 1+ 'use strict' ; 
2+ 
3+ // Initialize vinyl-fs-wrap in Node.js 6+ compatibility mode 
4+ var  vfsWrap  =  require ( './vinyl-fs-wrap' ) ; 
5+ vfsWrap . initCompat ( ) ; 
6+ 
7+ // Export the origial Gulp 
8+ module . exports  =  require ( './index' ) ; 
Original file line number Diff line number Diff line change @@ -4,7 +4,10 @@ var util = require('util');
44var  Orchestrator  =  require ( 'orchestrator' ) ; 
55var  gutil  =  require ( 'gulp-util' ) ; 
66var  deprecated  =  require ( 'deprecated' ) ; 
7- var  vfs  =  require ( 'vinyl-fs' ) ; 
7+ 
8+ var  vfsWrap  =  require ( './vinyl-fs-wrap' ) ; 
9+ vfsWrap . init ( ) ; 
10+ var  vfs  =  vfsWrap . vfs ; 
811
912function  Gulp ( )  { 
1013  Orchestrator . call ( this ) ; 
Original file line number Diff line number Diff line change 3838    "semver" : " ^4.1.0" 
3939    "tildify" : " ^1.0.0" 
4040    "v8flags" : " ^2.0.2" 
41-     "vinyl-fs" : " ^0.3.0" 
41+     "vinyl-fs" : " ^0.3.0" 
42+     "vinyl-fs-03-compat" : " ^0.3.15" 
4243  },
4344  "devDependencies" : {
4445    "coveralls" : " ^2.7.0" 
Original file line number Diff line number Diff line change 1+ 'use strict' ; 
2+ 
3+ var  compat  =  false ; 
4+ 
5+ function  init ( )  { 
6+   if  ( exports . vfs )  { 
7+     return ; 
8+   } 
9+   exports . vfs  =  require ( 'vinyl-fs' ) ; 
10+ } 
11+ 
12+ function  initCompat ( )  { 
13+   if  ( exports . vfs )  { 
14+     if  ( ! compat )  { 
15+       throw  new  Error ( 
16+         'Gulp was already initialized without Node.js 6+ compatibility mode!\n'  + 
17+         'Make sure that you require gulp/compat before other gulp plugins.\n'  + 
18+         '\n'  + 
19+         'Note that dependencies should not force this mode.\n'  + 
20+         'The compatibility mode is intended only for the top-most gulpfile.js.\n' 
21+       ) ; 
22+     } 
23+     return ; 
24+   } 
25+   compat  =  true ; 
26+   exports . vfs  =  require ( 'vinyl-fs-03-compat' ) ; 
27+ } 
28+ 
29+ exports . init  =  init ; 
30+ exports . initCompat  =  initCompat ; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments