@@ -43,9 +43,12 @@ var paths = {
43
43
output : 'src/main/xar-resources/resources/'
44
44
} ,
45
45
fonts : {
46
- output : 'src/main/xar-resources/resources/fonts/' ,
46
+ output : 'src/main/xar-resources/resources/fonts/'
47
47
} ,
48
- listings : 'src/main/xar-resources/data/*/listings/*.xml'
48
+ xml : {
49
+ listings : 'src/main/xar-resources/data/*/listings/*.xml' ,
50
+ articles : 'src/main/xar-resources/data/*/*.xml'
51
+ }
49
52
}
50
53
51
54
/**
@@ -86,7 +89,7 @@ var lazypipe = require('lazypipe')
86
89
var rename = require ( 'gulp-rename' )
87
90
var header = require ( 'gulp-header' )
88
91
var pkg = require ( './package.json' )
89
- var prettyData = require ( 'gulp-pretty-data ' )
92
+ var muxml = require ( 'gulp-muxml ' )
90
93
91
94
92
95
// Scripts
@@ -196,18 +199,19 @@ var lintScripts = function(done) {
196
199
done ( )
197
200
}
198
201
199
- // minify and lint xml
202
+ // pretty print all xml listings
203
+ // articles not yet decided
200
204
var prettyXml = function ( done ) {
201
- src ( paths . listings , { base : "./" } )
202
- . pipe ( prettyData ( {
203
- type : 'minify' ,
204
- preserveComments : true
205
- } ) )
206
- // … then pretty print xml
207
- . pipe ( prettyData ( {
208
- type : 'prettify' ,
209
- preserveComments : true
210
- } ) )
205
+ src ( paths . xml . listings , { base : "./" } )
206
+ . pipe ( muxml ( {
207
+ stripComments : false ,
208
+ stripCdata : false ,
209
+ stripInstruction : false ,
210
+ saxOptions : {
211
+ trim : true ,
212
+ normalize : true
213
+ }
214
+ } ) )
211
215
. pipe ( dest ( "./" ) )
212
216
// Signal completion
213
217
done ( )
0 commit comments