Remove messages.inc, rebuildLanguage.php, writeMessagesArray.inc
[mediawiki.git] / tests / frontend / Gruntfile.js
blobf18903b80b6381b662716aa6edfd3bea5b637f7b
1 /*!
2  * Grunt file
3  */
5 /*jshint node:true */
6 module.exports = function ( grunt ) {
7         grunt.loadNpmTasks( 'grunt-contrib-jshint' );
8         grunt.loadNpmTasks( 'grunt-banana-checker' );
9         grunt.loadNpmTasks( 'grunt-contrib-watch' );
10         grunt.loadNpmTasks( 'grunt-jscs-checker' );
11         grunt.loadNpmTasks( 'grunt-jsonlint' );
13         grunt.file.setBase(  __dirname + '/../..' );
15         grunt.initConfig( {
16                 pkg: grunt.file.readJSON( __dirname + '/package.json' ),
17                 jshint: {
18                         options: {
19                                 jshintrc: '.jshintrc'
20                         },
21                         all: [ '*.js', '{includes,languages,resources,skins,tests}/**/*.js' ]
22                 },
23                 jscs: {
24                         // Known issues:
25                         // - https://github.com/mdevils/node-jscs/issues/277
26                         // - https://github.com/mdevils/node-jscs/issues/278
27                         all: [
28                                 '<%= jshint.all %>',
29                                 // Auto-generated file with JSON (double quotes)
30                                 '!tests/qunit/data/mediawiki.jqueryMsg.data.js'
32                         // Exclude all files ignored by jshint
33                         ].concat( grunt.file.read( '.jshintignore' ).split( '\n' ).reduce( function ( patterns, pattern ) {
34                                 // Filter out empty lines
35                                 if ( pattern.length && pattern[0] !== '#' ) {
36                                         patterns.push( '!' + pattern );
37                                 }
38                                 return patterns;
39                         }, [] ) )
40                 },
41                 jsonlint: {
42                         all: [
43                                 '.jscsrc',
44                                 '{languages,languages,maintenance,resources}/**/*.json',
45                                 'tests/frontend/package.json'
46                         ]
47                 },
48                 banana: {
49                         core: 'languages/i18n/',
50                         installer: 'includes/installer/i18n/'
51                 },
52                 watch: {
53                         files: [
54                                 '<%= jscs.all %>',
55                                 '<%= jsonlint.all %>',
56                                 '.jshintignore',
57                                 '.jshintrc'
58                         ],
59                         tasks: ['test']
60                 }
61         } );
63         grunt.registerTask( 'lint', ['jshint', 'jscs', 'jsonlint', 'banana'] );
64         grunt.registerTask( 'test', ['lint'] );
65         grunt.registerTask( 'default', ['test'] );