@ -2,6 +2,7 @@
module . exports = function ( grunt ) {
module . exports = function ( grunt ) {
grunt . loadNpmTasks ( 'grunt-contrib-copy' ) ;
grunt . loadNpmTasks ( 'grunt-contrib-copy' ) ;
grunt . loadNpmTasks ( 'grunt-contrib-jshint' ) ;
grunt . loadNpmTasks ( 'grunt-contrib-jshint' ) ;
grunt . loadNpmTasks ( 'grunt-stylelint' ) ;
grunt . loadNpmTasks ( 'grunt-contrib-watch' ) ;
grunt . loadNpmTasks ( 'grunt-contrib-watch' ) ;
grunt . loadNpmTasks ( 'grunt-banana-checker' ) ;
grunt . loadNpmTasks ( 'grunt-banana-checker' ) ;
grunt . loadNpmTasks ( 'grunt-jscs' ) ;
grunt . loadNpmTasks ( 'grunt-jscs' ) ;
@ -39,9 +40,15 @@ module.exports = function ( grunt ) {
api : 'includes/api/i18n/' ,
api : 'includes/api/i18n/' ,
installer : 'includes/installer/i18n/'
installer : 'includes/installer/i18n/'
} ,
} ,
stylelint : {
options : {
syntax : 'less'
} ,
src : '{resources/src/*,{mw-config,tests}/**}/*.{css,less}'
} ,
watch : {
watch : {
files : [
files : [
'.js*' ,
'. {stylelintrc,jscsrc,jshintignore,jshintrc} ',
'**/*' ,
'**/*' ,
'!{docs,extensions,node_modules,skins,vendor}/**'
'!{docs,extensions,node_modules,skins,vendor}/**'
] ,
] ,
@ -96,7 +103,7 @@ module.exports = function ( grunt ) {
return ! ! ( process . env . MW _SERVER && process . env . MW _SCRIPT _PATH ) ;
return ! ! ( process . env . MW _SERVER && process . env . MW _SCRIPT _PATH ) ;
} ) ;
} ) ;
grunt . registerTask ( 'lint' , [ 'jshint' , 'jscs' , 'jsonlint' , 'banana' ] ) ;
grunt . registerTask ( 'lint' , [ 'jshint' , 'jscs' , 'jsonlint' , 'banana' , 'stylelint' ] ) ;
grunt . registerTask ( 'qunit' , [ 'assert-mw-env' , 'karma:main' ] ) ;
grunt . registerTask ( 'qunit' , [ 'assert-mw-env' , 'karma:main' ] ) ;
grunt . registerTask ( 'test' , [ 'lint' ] ) ;
grunt . registerTask ( 'test' , [ 'lint' ] ) ;