Skip to content

Commit cc32790

Browse files
committed
Added grunt.js and .gitignore files
1 parent 66ac8d5 commit cc32790

2 files changed

Lines changed: 42 additions & 0 deletions

File tree

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
dist
2+
node_modules
3+
.project
4+
*~
5+
*.diff
6+
*.patch
7+
.DS_Store
8+
.settings

grunt.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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+
};

0 commit comments

Comments
 (0)