mediawiki-extensions-Visual.../Gruntfile.js
Roan Kattouw 2e5e7594a8 Update VE core submodule to master (19be0c1)
Also add OO.ui.ConfirmationDialog things and
update Gruntfile.js for breaking changes in VE core.

New changes:
5f1514b Localisation updates from https://translatewiki.net.
0cde22f Localisation updates from https://translatewiki.net.
ca021d8 Fix desktop dialogs
3503287 Localisation updates from https://translatewiki.net.
f02286b build: [BREAKING CHANGE] Add dependency expression
25fc053 Use message function and correct message key
a097202 Create phantom/shield nodes with methods not templates
1399844 Load dependencies in correct order
5a39c9e build: Simplify building of module dependency list
2a3871f build: Upgrade jscs and jshint
7db9b88 Localisation updates from https://translatewiki.net.
d34b2ae Update OOjs UI to v0.1.0-pre (80f1797a5c)

Change-Id: I0f23042e3cadd4614cd1dcd905287af777dd6ed3
2014-05-14 15:27:46 -07:00

94 lines
1.9 KiB
JavaScript

/*!
* Grunt file
*
* @package VisualEditor
*/
/*jshint node:true */
module.exports = function ( grunt ) {
var modules = grunt.file.readJSON( 'lib/ve/build/modules.json' );
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-contrib-csslint' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-jscs-checker' );
grunt.loadTasks( 'lib/ve/build/tasks' );
grunt.loadTasks( 'build/tasks' );
grunt.initConfig( {
pkg: grunt.file.readJSON( 'package.json' ),
jsduckcatconfig: {
main: {
target: '.docs/categories.json',
from: [
'.docs/mw-categories.json',
{
file: 'lib/ve/.docs/categories.json',
aggregate: {
'VisualEditor (core)': [
'General',
'Initialization',
'DataModel',
'ContentEditable',
'User Interface',
'Tests'
]
},
include: ['UnicodeJS', 'OOJS UI', 'Upstream']
}
]
}
},
buildloader: {
egiframe: {
targetFile: '.docs/eg-iframe.html',
template: '.docs/eg-iframe.html.template',
modules: modules,
load: [ 'visualEditor.desktop' ],
pathPrefix: 'lib/ve/',
indent: '\t\t'
}
},
jshint: {
options: {
jshintrc: '.jshintrc'
},
all: [
'*.js',
'{.docs,build}/**/*.js',
'modules/**/*.js'
]
},
jscs: {
src: [
'<%= jshint.all %>'
]
},
csslint: {
options: {
csslintrc: '.csslintrc'
},
all: [
'modules/*/**/*.css'
],
},
banana: {
all: 'modules/ve-{mw,wmf}/i18n/'
},
watch: {
files: [
'.{csslintrc,jscsrc,jshintignore,jshintrc}',
'<%= jshint.all %>',
'<%= csslint.all %>'
],
tasks: ['test']
}
} );
grunt.registerTask( 'build', ['jsduckcatconfig', 'buildloader'] );
grunt.registerTask( 'lint', ['jshint', 'jscs', 'csslint', 'banana' ] );
grunt.registerTask( 'test', ['build', 'lint'] );
grunt.registerTask( 'default', ['test'] );
};