Skip to content

Commit

Permalink
A Static Code Analysis Tool for HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
yaniswang committed Feb 24, 2013
1 parent aee3eb5 commit a4c1b11
Show file tree
Hide file tree
Showing 22 changed files with 1,267 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -0,0 +1,2 @@
node_modules
lib-cov
2 changes: 2 additions & 0 deletions .npmignore
@@ -0,0 +1,2 @@
node_modules
lib-cov
55 changes: 55 additions & 0 deletions Gruntfile.js
@@ -0,0 +1,55 @@
/*global module:false*/
module.exports = function(grunt) {

grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-replace');
grunt.loadNpmTasks('grunt-contrib-watch');

// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
clean: ["lib"],
concat: {
htmlhint: {
src: ['src/core.js', 'src/reporter.js', 'src/htmlparser.js', 'src/rules/*.js'],
dest: 'lib/htmlhint.js'
}
},
uglify: {
htmlhint: {
options: {
banner: "/*! HTMLHint v<%= pkg.version %> | (c) 2013 Yanis Wang <yanis.wang@gmail.com>.\r\nMIT Licensed */\n",
beautify: {
ascii_only: true
}
},
files: {
'lib/<%= pkg.name %>.js': ['<%= concat.htmlhint.dest %>']
}
}
},
replace: {
htmlhint: {
files: { 'lib/':'lib/htmlhint.js'},
options: {
prefix: '@',
variables: {
'VERSION': '<%= pkg.version %>'
}
},
}
},
watch: {
src: {
files: 'src/**/*.js',
tasks: 'concat',
}
}
});

// Default task.
grunt.registerTask('default', ['clean', 'concat', 'uglify', 'replace']);

};
23 changes: 23 additions & 0 deletions LICENSE.md
@@ -0,0 +1,23 @@

The MIT License
================

Copyright (c) 2012 Yanis Wang \<yanis.wang@gmail.com\>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
40 changes: 38 additions & 2 deletions README.md
@@ -1,4 +1,40 @@
HTMLHint
========
=======================

A Static Code Analysis Tool for HTML
A Static Code Analysis Tool for HTML

License
================

jWebDriver is released under the MIT license:

> The MIT License
>
> Copyright (c) 2012 Yanis Wang \<yanis.wang@gmail.com\>
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in
> all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
> THE SOFTWARE.
Thanks
================

* mocha: [https://github.com/visionmedia/mocha](https://github.com/visionmedia/mocha)
* expect.js: [https://github.com/LearnBoost/expect.js](https://github.com/LearnBoost/expect.js)
* jscover [https://github.com/fengmk2/jscover](https://github.com/fengmk2/jscover)
* Grunt [http://gruntjs.com/](http://gruntjs.com/)
* GitHub: [https://github.com/](https://github.com/)
3 changes: 3 additions & 0 deletions index.js
@@ -0,0 +1,3 @@
module.exports = process.env.COV
? require('./lib-cov/htmlhint')
: require('./lib/htmlhint');

0 comments on commit a4c1b11

Please sign in to comment.