Add CSSLint and grunt test task to lint CSS in the src/ dir

This gives basic linting of src CSS, but ignores linting normalize.css.
This commit is contained in:
Eric Ferraiuolo 2013-06-05 09:25:13 -04:00
parent 30ae5a02de
commit 4783db4201
3 changed files with 30 additions and 1 deletions

5
.csslintrc Normal file
View File

@ -0,0 +1,5 @@
{
"box-sizing" : false,
"display-property-grouping": false,
"star-property-hack" : false
}

View File

@ -135,6 +135,22 @@ grunt.initConfig({
}
},
// -- CSSLint Config -------------------------------------------------------
csslint: {
options: {
csslintrc: '.csslintrc'
},
src: {
src: [
'src/**/css/*.css',
'!src/base/css/*',
'!src/forms/css/forms-core.css'
]
}
},
// -- CSSMin Config --------------------------------------------------------
cssmin: {
@ -219,6 +235,7 @@ grunt.initConfig({
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-csslint');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-compress');
@ -237,7 +254,12 @@ grunt.registerTask('import', [
'import-normalize'
]);
grunt.registerTask('test', [
'csslint'
]);
grunt.registerTask('release', [
'test',
'default',
'clean:release',
'compress:release'

View File

@ -2,6 +2,7 @@
"name": "pure",
"version": "0.1.1-pre",
"private": true,
"repository": "git://github.com/yui/pure.git",
"devDependencies": {
"grunt": "~0.4.1",
"parserlib": "~0.2.2",
@ -10,6 +11,7 @@
"grunt-contrib-copy": "~0.4.1",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-compress": "~0.5.0",
"bower": "~0.9.2"
"bower": "~0.9.2",
"grunt-contrib-csslint": "~0.1.2"
}
}