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, "private": true,
"scripts": { "scripts": {
"test": "grunt test && dev-scripts/svg_check.sh" "test": "grunt test && npm run doc && dev-scripts/svg_check.sh",
"doc": "jsduck"
}, },
"dependencies": { "dependencies": {
"jsdoc": "3.4.2",
"svgo": ">=0.4.4" "svgo": ">=0.4.4"
}, },
"devDependencies": { "devDependencies": {

View File

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

View File

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