File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 1
- var map = require ( "map- stream" ) ,
1
+ var Stream = require ( "stream" ) ,
2
2
Path = require ( "path" ) ;
3
3
4
- module . exports = function ( obj ) {
4
+ function gulpRename ( obj ) {
5
5
"use strict" ;
6
6
7
+ var stream = new Stream . Transform ( { objectMode : true } ) ;
8
+
7
9
function parsePath ( path ) {
8
10
var extname = Path . extname ( path ) ;
9
11
return {
@@ -13,7 +15,7 @@ module.exports = function (obj) {
13
15
} ;
14
16
}
15
17
16
- function rename ( file , callback ) {
18
+ stream . _transform = function ( file , unused , callback ) {
17
19
18
20
var parsedPath = parsePath ( file . relative ) ;
19
21
var path ;
@@ -49,5 +51,8 @@ module.exports = function (obj) {
49
51
callback ( null , file ) ;
50
52
}
51
53
52
- return map ( rename ) ;
54
+ return stream ;
53
55
} ;
56
+
57
+ module . exports = gulpRename ;
58
+
Original file line number Diff line number Diff line change 30
30
"gulp-jshint" : " >=1.1.0"
31
31
},
32
32
"engines" : {
33
- "node" : " >=0.8 .0" ,
33
+ "node" : " >=0.10 .0" ,
34
34
"npm" : " >=1.2.10"
35
35
},
36
36
"licenses" : [
You can’t perform that action at this time.
0 commit comments