docs: Remove further references to jsduck
Bug: T138401 Change-Id: I80739776e2fa55536d51e2d7e2743d337bd54135
This commit is contained in:
parent
7d27c66853
commit
5a3922a4af
8 changed files with 3 additions and 450 deletions
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"extends": [
|
||||
"wikimedia/jsduck"
|
||||
]
|
||||
}
|
||||
|
|
@ -1,127 +0,0 @@
|
|||
[
|
||||
{
|
||||
"name": "MediaWiki",
|
||||
"groups": [
|
||||
{
|
||||
"name": "Base",
|
||||
"classes": [
|
||||
"global",
|
||||
"mw",
|
||||
"mw.Message",
|
||||
"mw.loader",
|
||||
"mw.html",
|
||||
"mw.html.Raw",
|
||||
"mw.hook",
|
||||
"mw.template",
|
||||
"mw.errorLogger"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "General",
|
||||
"classes": [
|
||||
"mw.Title",
|
||||
"mw.Uri",
|
||||
"mw.String",
|
||||
"mw.messagePoster.*",
|
||||
"mw.notification",
|
||||
"mw.Notification_",
|
||||
"mw.storage",
|
||||
"mw.storage.session",
|
||||
"mw.user",
|
||||
"mw.user.clientPrefs",
|
||||
"mw.util",
|
||||
"mw.plugin.*",
|
||||
"mw.cookie",
|
||||
"mw.experiments",
|
||||
"mw.visibleTimeout"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "API",
|
||||
"classes": [ "mw.Api*", "mw.ForeignApi*", "mw.Rest*", "mw.ForeignRest*" ]
|
||||
},
|
||||
{
|
||||
"name": "Language",
|
||||
"classes": [
|
||||
"mw.language*",
|
||||
"mw.cldr",
|
||||
"mw.jqueryMsg"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Interfaces",
|
||||
"classes": [
|
||||
"mw.Feedback*",
|
||||
"mw.Upload*",
|
||||
"mw.ForeignUpload",
|
||||
"mw.ForeignStructuredUpload*",
|
||||
"mw.GallerySlideshow",
|
||||
"mw.rcfilters*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Widgets",
|
||||
"classes": [
|
||||
"mw.widgets*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Special",
|
||||
"classes": [
|
||||
"mw.special*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Development",
|
||||
"classes": [
|
||||
"mw.log",
|
||||
"mw.inspect",
|
||||
"mw.Debug"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "jQuery",
|
||||
"groups": [
|
||||
{
|
||||
"name": "Plugins",
|
||||
"classes": [
|
||||
"jQuery.client",
|
||||
"jQuery.plugin.*"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Upstream",
|
||||
"groups": [
|
||||
{
|
||||
"name": "OOjs",
|
||||
"classes": [
|
||||
"OO",
|
||||
"OO.EmitterList",
|
||||
"OO.EventEmitter",
|
||||
"OO.Factory",
|
||||
"OO.Registry",
|
||||
"OO.SortedEmitterList"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "OOUI",
|
||||
"classes": [
|
||||
"OO.ui",
|
||||
"OO.ui.*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "jQuery",
|
||||
"classes": [ "jQuery", "jQuery.Event", "jQuery.Callbacks", "jQuery.Promise", "jQuery.Deferred", "jQuery.jqXHR", "QUnit" ]
|
||||
},
|
||||
{
|
||||
"name": "JavaScript",
|
||||
"classes": [ "Array", "Boolean", "Date", "Function", "Number", "Object", "RegExp", "String" ]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
@ -1,102 +0,0 @@
|
|||
# Custom tags for JSDuck 5.x
|
||||
# See also:
|
||||
# - https://github.com/senchalabs/jsduck/wiki/Custom-tags
|
||||
# - https://github.com/senchalabs/jsduck/wiki/Custom-tags/7f5c32e568eab9edc8e3365e935bcb836cb11f1d
|
||||
require 'jsduck/tag/tag'
|
||||
|
||||
class CommonTag < JsDuck::Tag::Tag
|
||||
def initialize
|
||||
@html_position = POS_DOC + 0.1
|
||||
@repeatable = true
|
||||
end
|
||||
|
||||
def parse_doc(scanner, _position)
|
||||
if @multiline
|
||||
return { tagname: @tagname, doc: :multiline }
|
||||
else
|
||||
text = scanner.match(/.*$/)
|
||||
return { tagname: @tagname, doc: text }
|
||||
end
|
||||
end
|
||||
|
||||
def process_doc(context, tags, _position)
|
||||
context[@tagname] = tags
|
||||
end
|
||||
|
||||
def format(context, formatter)
|
||||
context[@tagname].each do |tag|
|
||||
tag[:doc] = formatter.format(tag[:doc])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class SeeTag < CommonTag
|
||||
def initialize
|
||||
@tagname = :see
|
||||
@pattern = 'see'
|
||||
super
|
||||
end
|
||||
|
||||
def format(context, formatter)
|
||||
position = context[:files][0]
|
||||
context[@tagname].each do |tag|
|
||||
tag[:doc] = '<li>' + render_long_see(tag[:doc], formatter, position) + '</li>'
|
||||
end
|
||||
end
|
||||
|
||||
def to_html(context)
|
||||
<<-EOHTML
|
||||
<h3 class="pa">Related</h3>
|
||||
<ul>
|
||||
#{context[@tagname].map { |tag| tag[:doc] }.join("\n")}
|
||||
</ul>
|
||||
EOHTML
|
||||
end
|
||||
|
||||
def render_long_see(tag, formatter, position)
|
||||
match = /\A([^\s]+)( .*)?\Z/m.match(tag)
|
||||
|
||||
if match
|
||||
name = match[1]
|
||||
doc = match[2] ? ': ' + match[2] : ''
|
||||
return formatter.format("{@link #{name}} #{doc}")
|
||||
else
|
||||
JsDuck::Logger.warn(nil, 'Unexpected @see argument: "' + tag + '"', position)
|
||||
return tag
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class ContextTag < CommonTag
|
||||
def initialize
|
||||
@tagname = :this
|
||||
@pattern = 'this'
|
||||
super
|
||||
end
|
||||
|
||||
def format(context, formatter)
|
||||
position = context[:files][0]
|
||||
context[@tagname].each do |tag|
|
||||
tag[:doc] = render_long_this(tag[:doc], formatter, position)
|
||||
end
|
||||
end
|
||||
|
||||
def to_html(context)
|
||||
<<-EOHTML
|
||||
<h3 class="pa">Context</h3>
|
||||
#{context[@tagname].last[:doc]}
|
||||
EOHTML
|
||||
end
|
||||
|
||||
def render_long_this(tag, formatter, position)
|
||||
match = /\A([^\s]+)/m.match(tag)
|
||||
|
||||
if match
|
||||
name = match[1]
|
||||
return formatter.format("`context` : {@link #{name}}")
|
||||
else
|
||||
JsDuck::Logger.warn(nil, 'Unexpected @this argument: "' + tag + '"', position)
|
||||
return tag
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -1,126 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>MediaWiki Code Example</title>
|
||||
<script>
|
||||
/**
|
||||
* Basic log console for the example iframe in documentation pages.
|
||||
*/
|
||||
var log = ( function () {
|
||||
var pre;
|
||||
return function () {
|
||||
var str, i, len, line;
|
||||
if ( !pre ) {
|
||||
pre = document.createElement( 'pre' );
|
||||
pre.className = 'mw-jsduck-log';
|
||||
( document.body || document.documentElement ).appendChild( pre );
|
||||
}
|
||||
str = [];
|
||||
for ( i = 0, len = arguments.length; i < len; i++ ) {
|
||||
str.push( String( arguments[ i ] ) );
|
||||
}
|
||||
line = document.createElement( 'div' );
|
||||
line.className = 'mw-jsduck-log-line';
|
||||
line.appendChild(
|
||||
document.createTextNode( str.join( ' , ' ) + '\n' )
|
||||
);
|
||||
pre.appendChild( line );
|
||||
};
|
||||
}() );
|
||||
|
||||
window.onerror = function ( error, filePath, linerNr ) {
|
||||
log( error + '\n' + filePath + ':' + linerNr );
|
||||
};
|
||||
</script>
|
||||
<script>
|
||||
// Mock StartUpModule substitutions
|
||||
window.$VARS = {
|
||||
baseModules: [],
|
||||
storeEnabled: false,
|
||||
maxQueryLength: 2000
|
||||
};
|
||||
window.$CODE = {
|
||||
};
|
||||
// Mock startup.js
|
||||
window.RLQ = [];
|
||||
// Mock mw.loader#execute context
|
||||
function require() {}
|
||||
</script>
|
||||
<script src="modules/src/startup/mediawiki.js"></script>
|
||||
<script src="modules/src/startup/mediawiki.loader.js"></script>
|
||||
<script src="modules/src/startup/mediawiki.requestIdleCallback.js"></script>
|
||||
<script src="modules/lib/jquery/jquery.js"></script>
|
||||
<script src="modules/src/mediawiki.base/log.js"></script>
|
||||
<script src="modules/src/mediawiki.base/errorLogger.js"></script>
|
||||
<script src="modules/src/mediawiki.base/mediawiki.base.js"></script>
|
||||
<script src="modules/lib/oojs/oojs.js"></script>
|
||||
<script src="modules/lib/ooui/oojs-ui-core.js"></script>
|
||||
<script src="modules/lib/ooui/oojs-ui-widgets.js"></script>
|
||||
<script src="modules/lib/ooui/oojs-ui-toolbars.js"></script>
|
||||
<script src="modules/lib/ooui/oojs-ui-windows.js"></script>
|
||||
<script src="modules/lib/ooui/oojs-ui-wikimediaui.js"></script>
|
||||
<style>
|
||||
body {
|
||||
font-size: 0.8em;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
.mw-jsduck-log {
|
||||
position: relative;
|
||||
min-height: 3em;
|
||||
margin-top: 2em;
|
||||
background: #f7f7f7;
|
||||
border: 1px solid #e4e4e4;
|
||||
}
|
||||
|
||||
.mw-jsduck-log::after {
|
||||
position: absolute;
|
||||
bottom: 100%;
|
||||
right: -1px;
|
||||
padding: 0.5em;
|
||||
background: #fff;
|
||||
border: 1px solid #e4e4e4;
|
||||
border-bottom: 0;
|
||||
border-radius: 0.5em 0.5em 0 0;
|
||||
font: normal 0.5em sans-serif;
|
||||
content: 'console';
|
||||
}
|
||||
|
||||
.mw-jsduck-log-line {
|
||||
padding: 0.2em 0.5em;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.mw-jsduck-log-line:nth-child(odd) {
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="modules/lib/ooui/oojs-ui-core-wikimediaui.css">
|
||||
<link rel="stylesheet" href="modules/lib/ooui/oojs-ui-widgets-wikimediaui.css">
|
||||
<link rel="stylesheet" href="modules/lib/ooui/oojs-ui-toolbars-wikimediaui.css">
|
||||
<link rel="stylesheet" href="modules/lib/ooui/oojs-ui-windows-wikimediaui.css">
|
||||
<link rel="stylesheet" href="modules/lib/ooui/oojs-ui-images-wikimediaui.css">
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
if ( window.mw ) {
|
||||
mw.log = log;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method called by jsduck to execute the example code.
|
||||
*/
|
||||
function loadInlineExample( code, options, callback ) {
|
||||
try {
|
||||
eval( code );
|
||||
callback && callback( true );
|
||||
} catch ( e ) {
|
||||
log( 'Uncaught ' + e );
|
||||
callback && callback( false, e );
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,87 +0,0 @@
|
|||
/**
|
||||
* Source: <https://api.jquery.com/>
|
||||
*
|
||||
* @class jQuery
|
||||
*/
|
||||
|
||||
/**
|
||||
* Source: <https://api.jquery.com/jQuery.ajax/>
|
||||
*
|
||||
* @method ajax
|
||||
* @static
|
||||
* @return {jQuery.jqXHR}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Source: <https://api.jquery.com/Types/#Event>
|
||||
*
|
||||
* @class jQuery.Event
|
||||
*/
|
||||
|
||||
/**
|
||||
* Source: <https://api.jquery.com/jQuery.Callbacks/>
|
||||
*
|
||||
* @class jQuery.Callbacks
|
||||
*/
|
||||
|
||||
/**
|
||||
* Source: <https://api.jquery.com/Types/#Promise>
|
||||
*
|
||||
* @class jQuery.Promise
|
||||
*/
|
||||
|
||||
/**
|
||||
* Source: <https://api.jquery.com/jQuery.Deferred/>
|
||||
*
|
||||
* @class jQuery.Deferred
|
||||
* @mixins jQuery.Promise
|
||||
*/
|
||||
|
||||
/**
|
||||
* Source: <https://api.jquery.com/Types/#jqXHR>
|
||||
*
|
||||
* @class jQuery.jqXHR
|
||||
* @mixins jQuery.Promise
|
||||
*/
|
||||
|
||||
/**
|
||||
* Source: <https://api.qunitjs.com/>
|
||||
*
|
||||
* @class QUnit
|
||||
*/
|
||||
|
||||
/**
|
||||
* Source: <https://doc.wikimedia.org/oojs/master/OO.html>
|
||||
*
|
||||
* @class OO
|
||||
*/
|
||||
|
||||
/**
|
||||
* Source: <https://doc.wikimedia.org/oojs/master/OO.EventEmitter.html>
|
||||
*
|
||||
* @class OO.EventEmitter
|
||||
*/
|
||||
|
||||
/**
|
||||
* Source: <https://doc.wikimedia.org/oojs/master/OO.EmitterList.html>
|
||||
*
|
||||
* @class OO.EmitterList
|
||||
*/
|
||||
|
||||
/**
|
||||
* Source: <https://doc.wikimedia.org/oojs/master/OO.Factory.html>
|
||||
*
|
||||
* @class OO.Factory
|
||||
*/
|
||||
|
||||
/**
|
||||
* Source: <https://doc.wikimedia.org/oojs/master/OO.Registry.html>
|
||||
*
|
||||
* @class OO.Registry
|
||||
*/
|
||||
|
||||
/**
|
||||
* Source: <https://doc.wikimedia.org/oojs/master/OO.SortedEmitterList.html>
|
||||
*
|
||||
* @class OO.SortedEmitterList
|
||||
*/
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
"wikimedia/client-es6",
|
||||
"wikimedia/jquery",
|
||||
"wikimedia/mediawiki",
|
||||
"wikimedia/jsduck"
|
||||
"wikimedia/jsdoc"
|
||||
],
|
||||
"globals": {
|
||||
"require": "readonly",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
"extends": [
|
||||
"wikimedia/client-es6",
|
||||
"wikimedia/mediawiki",
|
||||
"wikimedia/jsduck"
|
||||
"wikimedia/jsdoc"
|
||||
],
|
||||
"rules": {
|
||||
"compat/compat": [
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
"extends": [
|
||||
"wikimedia/client-es6",
|
||||
"wikimedia/mediawiki",
|
||||
"wikimedia/jsduck"
|
||||
"wikimedia/jsdoc"
|
||||
],
|
||||
"rules": {
|
||||
"compat/compat": [
|
||||
|
|
|
|||
Loading…
Reference in a new issue