File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 35
35
"dependencies" : {
36
36
"cson" : " ^4.1.0" ,
37
37
"plugin-error" : " ^0.1.2" ,
38
+ "replace-ext" : " ^1.0.0" ,
38
39
"through2" : " ^2.0.3" ,
39
40
"vinyl" : " ^2.1.0"
40
41
},
47
48
"del" : " ^3.0.0" ,
48
49
"globby" : " ^7.1.1" ,
49
50
"make-dir" : " ^1.1.0" ,
50
- "mocha" : " *" ,
51
- "replace-ext" : " ^1.0.0"
51
+ "mocha" : " *"
52
52
}
53
53
}
Original file line number Diff line number Diff line change 1
1
CSON = require ' cson'
2
2
PluginError = require ' plugin-error'
3
+ replaceExt = require ' replace-ext'
3
4
through = require ' through2'
4
5
5
6
PLUGIN_NAME = ' gulp-json2cson'
@@ -14,7 +15,7 @@ module.exports = (indent = ' ') ->
14
15
try
15
16
json = JSON .parse file .contents .toString ()
16
17
file .contents = Buffer .from CSON .stringify json, null , indent
17
- file .extname = ' .cson'
18
+ file .path = replaceExt file . path , ' .cson'
18
19
19
20
callback null , file
20
21
catch error
You can’t perform that action at this time.
0 commit comments