Don't display composer installed extensions/skins on Special:Version
[mediawiki.git] / tests / frontend / Gruntfile.js
blobc011a68f8888222be054a9e969412dbaab6376c0
1 /*!
2 * Grunt file
3 */
5 /*jshint node:true */
6 module.exports = function ( grunt ) {
7 grunt.loadNpmTasks( 'grunt-contrib-jshint' );
8 grunt.loadNpmTasks( 'grunt-contrib-watch' );
9 grunt.loadNpmTasks( 'grunt-banana-checker' );
10 grunt.loadNpmTasks( 'grunt-jscs' );
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: true
21 all: [
22 '*.js',
23 '{includes,languages,resources,skins,tests}/**/*.js'
26 jscs: {
27 all: [
28 '<%= jshint.all %>',
29 // Auto-generated file with JSON (double quotes)
30 '!tests/qunit/data/mediawiki.jqueryMsg.data.js',
31 // Skip functions are stored as script files but wrapped in a function when
32 // executed. node-jscs trips on the would-be "Illegal return statement".
33 '!resources/src/*-skip.js'
35 // Exclude all files ignored by jshint
36 ].concat( grunt.file.read( '.jshintignore' ).split( '\n' ).reduce( function ( patterns, pattern ) {
37 // Filter out empty lines
38 if ( pattern.length && pattern[0] !== '#' ) {
39 patterns.push( '!' + pattern );
41 return patterns;
42 }, [] ) )
44 jsonlint: {
45 all: [
46 '.jscsrc',
47 '{languages,maintenance,resources}/**/*.json',
48 'tests/frontend/package.json'
51 banana: {
52 core: 'languages/i18n/',
53 api: 'includes/api/i18n/',
54 installer: 'includes/installer/i18n/'
56 watch: {
57 files: [
58 '<%= jscs.all %>',
59 '<%= jsonlint.all %>',
60 '.jshintignore',
61 '.jshintrc'
63 tasks: 'test'
65 } );
67 grunt.registerTask( 'lint', ['jshint', 'jscs', 'jsonlint', 'banana'] );
68 grunt.registerTask( 'test', ['lint'] );
69 grunt.registerTask( 'default', ['test'] );