grunt-xml-validator
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -23,3 +23,3 @@ /* | ||
jshintrc: '.jshintrc', | ||
}, | ||
} | ||
}, | ||
@@ -29,4 +29,7 @@ | ||
xml_validator: { | ||
default: { | ||
src: [ 'test/fixtures/example_ok.xml', 'test/fixtures/example_fail.xml' ] | ||
valid: { | ||
src: [ 'test/fixtures/example_ok.xml' ] | ||
}, | ||
invalid: { | ||
src: [ 'test/fixtures/example_fail.xml' ] | ||
} | ||
@@ -37,3 +40,3 @@ }, | ||
nodeunit: { | ||
tests: ['test/*_test.js'], | ||
tests: ['test/test_*.js'], | ||
}, | ||
@@ -52,3 +55,3 @@ | ||
// plugin's task(s), then test the result. | ||
grunt.registerTask('test', ['xml_validator', 'nodeunit']); | ||
grunt.registerTask('test', ['nodeunit']); | ||
@@ -55,0 +58,0 @@ // By default, lint and run all tests. |
{ | ||
"name": "grunt-xml-validator", | ||
"description": "Grunt plugin to validate XML files", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"homepage": "https://github.com/kajyr/grunt-xml-validator", | ||
@@ -25,3 +25,3 @@ "author": { | ||
"engines": { | ||
"node": ">= 0.8.0" | ||
"node": ">= 0.10.0" | ||
}, | ||
@@ -44,4 +44,4 @@ "scripts": { | ||
"dependencies": { | ||
"libxmljs": "^0.8.1" | ||
"xmldom": "0.1.19" | ||
} | ||
} |
@@ -36,2 +36,4 @@ # grunt-xml-validator | ||
## Release History | ||
2014.03.29 - let's give it a try :) | ||
1.1.0 - Removed libxmljs due to incompatibility with Windows. Moved to xmldom. | ||
1.0.0 - let's give it a try :) |
@@ -13,9 +13,6 @@ /* | ||
// Please see the Grunt documentation for more information regarding task | ||
// creation: http://gruntjs.com/creating-tasks | ||
grunt.registerMultiTask('xml_validator', 'Grunt plugin to validate XML files', function() { | ||
// Merge task-specific and/or target-specific options with these defaults. | ||
var libxmljs = require("libxmljs"); | ||
var DOMParser = require('xmldom').DOMParser; | ||
var valid = 0; | ||
@@ -28,10 +25,10 @@ var fail = false; | ||
try { | ||
var xmlDoc = libxmljs.parseXml(xml); | ||
valid++; | ||
grunt.verbose.ok(f, 'valid'); | ||
} catch(e) { | ||
grunt.log.error(f + ' not valid'); | ||
fail = true; | ||
} | ||
var doc = new DOMParser({ | ||
locator:{}, | ||
errorHandler: function(level, msg) { | ||
fail = true | ||
} | ||
}).parseFromString(xml,'text/xml'); | ||
}); | ||
@@ -42,3 +39,3 @@ | ||
} else { | ||
grunt.log.ok( valid, ' files valid'); | ||
grunt.log.ok('Files valid'); | ||
} | ||
@@ -45,0 +42,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
7534
118
38
1
+ Addedxmldom@0.1.19
+ Addedxmldom@0.1.19(transitive)
- Removedlibxmljs@^0.8.1
- Removedbindings@1.0.0(transitive)
- Removedlibxmljs@0.8.1(transitive)