Remove old maintenance script importTextFile.php
[mediawiki.git] / tests / frontend / Gruntfile.js
blob59c18a8a1bd8cc36bd3bd486647404ede080247a
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,languages,maintenance,resources}/**/*.json',
48 'tests/frontend/package.json'
51 banana: {
52 core: 'languages/i18n/',
53 installer: 'includes/installer/i18n/'
55 watch: {
56 files: [
57 '<%= jscs.all %>',
58 '<%= jsonlint.all %>',
59 '.jshintignore',
60 '.jshintrc'
62 tasks: 'test'
64 } );
66 grunt.registerTask( 'lint', ['jshint', 'jscs', 'jsonlint', 'banana'] );
67 grunt.registerTask( 'test', ['lint'] );
68 grunt.registerTask( 'default', ['test'] );