mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-24 15:04:02 +00:00
626d9d4188
This adds a test which checks if the extension appears on the Special:Version page. This is an initial step for adding more browser tests to check changes done in I26fe41c328157233cc5b06d38d2ba0f7b036a853 Change-Id: I9a9d1cd2a25277f2c430f4e80b51b72c1621f91b
85 lines
1.5 KiB
JavaScript
85 lines
1.5 KiB
JavaScript
/*!
|
|
* Grunt file
|
|
*
|
|
* @package Cite
|
|
*/
|
|
|
|
/* eslint-env node, es6 */
|
|
|
|
module.exports = function ( grunt ) {
|
|
var conf = grunt.file.readJSON( 'extension.json' );
|
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
|
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
|
grunt.loadNpmTasks( 'grunt-svgmin' );
|
|
|
|
grunt.initConfig( {
|
|
eslint: {
|
|
all: [
|
|
'**/*.js',
|
|
'{.jsduck,build}/**/*.js',
|
|
'modules/**/*.js',
|
|
'tests/**/*.js',
|
|
'!node_modules/**',
|
|
'!vendor/**'
|
|
]
|
|
},
|
|
banana: conf.MessagesDirs,
|
|
stylelint: {
|
|
all: [
|
|
'**/*.css',
|
|
'**/*.less',
|
|
'!node_modules/**',
|
|
'!vendor/**'
|
|
]
|
|
},
|
|
jsonlint: {
|
|
all: [
|
|
'**/*.json',
|
|
'!node_modules/**',
|
|
'!vendor/**'
|
|
]
|
|
},
|
|
// SVG Optimization
|
|
svgmin: {
|
|
options: {
|
|
js2svg: {
|
|
pretty: true,
|
|
multipass: true
|
|
},
|
|
plugins: [ {
|
|
cleanupIDs: false
|
|
}, {
|
|
removeDesc: false
|
|
}, {
|
|
removeRasterImages: true
|
|
}, {
|
|
removeTitle: false
|
|
}, {
|
|
removeViewBox: false
|
|
}, {
|
|
removeXMLProcInst: false
|
|
}, {
|
|
sortAttrs: true
|
|
} ]
|
|
},
|
|
all: {
|
|
files: [ {
|
|
expand: true,
|
|
cwd: 'modules/ve-cite/icons',
|
|
src: [
|
|
'**/*.svg'
|
|
],
|
|
dest: 'modules/ve-cite/icons/',
|
|
ext: '.svg'
|
|
} ]
|
|
}
|
|
}
|
|
} );
|
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'jsonlint', 'banana', 'svgmin' ] );
|
|
grunt.registerTask( 'default', 'test' );
|
|
};
|