Skip to content

Commit

Permalink
Added csslint to Grunt test task
Browse files Browse the repository at this point in the history
  • Loading branch information
andersevenrud committed Jan 23, 2016
1 parent d901665 commit db5d850
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 16 deletions.
11 changes: 11 additions & 0 deletions .csslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"ids": false,
"important": false,
"box-sizing": false,
"fallback-colors": false,
"universal-selector": false,
"adjoining-classes": false,
"qualified-headings": false,
"font-faces": false,
"outline-none": false
}
27 changes: 26 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-jscs');
//grunt.loadNpmTasks('grunt-html-validation');
grunt.loadNpmTasks('grunt-contrib-csslint');
grunt.loadNpmTasks('grunt-nw-builder');

grunt.initConfig({
Expand Down Expand Up @@ -100,6 +101,30 @@
'!src/packages/default/Calculator/main.js'
]
},
csslint: {
options: {
csslintrc: '.csslintrc'
},
strict: {
src: [
'src/client/stylesheets/*.css',
'!src/client/stylesheets/gui.css',
'src/client/themes/fonts/*/*.css',
'src/client/themes/styles/*/*.css',
'src/packages/default/*/*.css',
'!src/packages/default/CoreWM/animations.css',
]
},
lax: {
options: {
'known-properties': false,
'compatible-vendor-prefixes': false
},
src: [
'src/client/stylesheets/gui.css'
]
}
},
mochaTest: {
test: {
src: ['test/server/*.js']
Expand Down Expand Up @@ -342,7 +367,7 @@
grunt.registerTask('nw', ['config', 'dist-index', 'core:nw', 'themes', 'packages', 'manifest', 'standalone:nw', 'nwjs']);
grunt.registerTask('dist', ['config', 'dist-index', 'core', 'themes', 'packages', 'manifest']);
grunt.registerTask('dist-dev', ['config', 'dist-dev-index', 'themes:fonts', 'themes:styles', 'manifest']);
grunt.registerTask('test', ['jshint', 'jscs', 'mochaTest'/*, 'mocha'*/]);
grunt.registerTask('test', ['jshint', 'jscs', 'csslint', 'mochaTest'/*, 'mocha'*/]);
};

})(require('node-fs-extra'), require('path'), require('./src/build.js'), require('grunt'), require('less'));
34 changes: 19 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
"email": "[email protected]"
}
],
"keywords": ["os.js", "web desktop", "cloud desktop"],
"keywords": [
"os.js",
"web desktop",
"cloud desktop"
],
"bugs": {
"url": "https://github.com/os-js/OS.js/issues"
},
Expand All @@ -23,22 +27,22 @@
"test": "grunt test"
},
"dependencies": {
"grunt": ">=0.4.5",
"time-grunt": ">=1.2.1",
"less": ">=2.5.3",
"cookies": ">=0.5.1",
"node-fs-extra": ">=0.8.1",
"formidable": ">=1.0.17",
"request": ">=2.64.0"
"grunt": ">=0.4.5",
"time-grunt": ">=1.2.1",
"less": ">=2.5.3",
"cookies": ">=0.5.1",
"node-fs-extra": ">=0.8.1",
"formidable": ">=1.0.17",
"request": ">=2.64.0"
},
"devDependencies": {
"clean-css": ">=3.4.5",
"uglify-js": ">=2.4.24",
"grunt-mocha-test": ">=0.12.7",
"grunt-contrib-watch": ">=0.6.1",
"clean-css": ">=3.4.5",
"uglify-js": ">=2.4.24",
"grunt-mocha-test": ">=0.12.7",
"grunt-contrib-watch": ">=0.6.1",
"grunt-contrib-jshint": ">=0.11.3",
"grunt-nw-builder": ">=2.0.0",
"grunt-jscs": ">=2.5.0"
"grunt-nw-builder": ">=2.0.0",
"grunt-jscs": ">=2.5.0",
"grunt-contrib-csslint": "~0.5.0"
}

}

0 comments on commit db5d850

Please sign in to comment.