File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ dist
2+ node_modules
3+ .project
4+ * ~
5+ * .diff
6+ * .patch
7+ .DS_Store
8+ .settings
Original file line number Diff line number Diff line change 1+ /*jshint node:true */
2+ module . exports = function ( grunt ) {
3+
4+ var entryFiles = grunt . file . expandFiles ( "entries/*.xml" ) ;
5+
6+ grunt . initConfig ( {
7+ lint : {
8+ grunt : "grunt.js"
9+ } ,
10+ xmllint : {
11+ all : entryFiles
12+ }
13+ } ) ;
14+
15+ grunt . registerTask ( "xmllint" , function ( ) {
16+ var taskDone = this . async ( ) ;
17+ grunt . utils . async . forEachSeries ( entryFiles , function ( file , done ) {
18+ grunt . utils . spawn ( {
19+ cmd : "xmllint" ,
20+ args : [ "--noout" , file ]
21+ } , function ( err , result ) {
22+ if ( err ) {
23+ grunt . log . error ( err ) ;
24+ done ( ) ;
25+ return ;
26+ }
27+ done ( ) ;
28+ } , taskDone ) ;
29+ } ) ;
30+ } ) ;
31+
32+ grunt . registerTask ( "default" , "lint xmllint" ) ;
33+
34+ } ;
You can’t perform that action at this time.
0 commit comments