Merge "Add tooling for documentation"

This commit is contained in:
jenkins-bot 2017-07-20 22:37:59 +00:00 committed by Gerrit Code Review
commit 27504d67c0
4 changed files with 37 additions and 10 deletions

34
jsduck.json Normal file
View File

@ -0,0 +1,34 @@
{
"--title": "MinervaNeue - Documentation",
"--output": "docs",
"--processes": "0",
"--warnings-exit-nonzero": true,
"--builtin-classes": true,
"--external": [
"Hogan.Template",
"HandleBars.Template",
"jQuery.Deferred",
"jQuery.Promise",
"jQuery.Event",
"jQuery.Object",
"jqXHR",
"View",
"Page",
"File",
"Router",
"MainMenu",
"mw.user",
"mw.Api",
"mw.ForeignApi",
"OO.ui.ToolGroup",
"OO.ui.Tool",
"OO.ui.mixin.LookupElement",
"OO.EventEmitter",
"ve.init.mw.MobileArticleTarget",
"mw.echo.dm.NotificationItem"
],
"--warnings": ["-nodoc(class,public)", "-dup_member", "-link_ambiguous"],
"--": [
"resources"
]
}

View File

@ -1,9 +1,11 @@
{
"private": true,
"scripts": {
"test": "grunt test && dev-scripts/svg_check.sh"
"test": "grunt test && npm run doc && dev-scripts/svg_check.sh",
"doc": "jsduck"
},
"dependencies": {
"jsdoc": "3.4.2",
"svgo": ">=0.4.4"
},
"devDependencies": {

View File

@ -17,11 +17,8 @@
}
OO.mfExtend( MainMenu, View, {
/** @inheritdoc */
isTemplateMode: true,
/** @inheritdoc */
template: mw.template.get( 'skins.minerva.mainMenu', 'menu.hogan' ),
/** @inheritdoc */
templatePartials: {
menuGroup: mw.template.get( 'skins.minerva.mainMenu', 'menuGroup.hogan' )
},
@ -51,7 +48,6 @@
} );
},
/**
* @inheritdoc
* Remove the nearby menu entry if the browser doesn't support geo location
*/
postRender: function () {

View File

@ -31,7 +31,6 @@
OO.mfExtend( NotificationBadge, View, {
/**
* @inheritdoc
* @cfg {Object} defaults Default options hash.
* @cfg {String} defaults.notificationIconClass e.g. mw-ui-icon for icon
* @cfg {String} defaults.loadingIconHtml for spinner
@ -45,9 +44,6 @@
hasUnseenNotifications: false,
notificationCount: 0
},
/**
* @inheritdoc
*/
isBorderBox: false,
/**
* Loads a ResourceLoader module script. Shows ajax loader whilst loading.
@ -107,7 +103,6 @@
} );
} );
},
/** @inheritdoc */
template: mw.template.get( 'skins.minerva.notifications.badge', 'badge.hogan' ),
/**
* Click handler for clicking on the badge