Viewing File: /home/omtekel/www/wp-content/upgrade/backup/.jsduck.tar
CustomTags.rb 0000666 00000005062 15133474070 0007175 0 ustar 00 # Custom tags for JSDuck 5.x
# See also:
# - https://github.com/senchalabs/jsduck/wiki/Tags
# - 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 SourceTag < CommonTag
def initialize
@tagname = :source
@pattern = 'source'
super
end
def to_html(context)
context[@tagname].map do |source|
<<-EOHTML
<h3 class='pa'>Source</h3>
#{source[:doc]}
EOHTML
end.join
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)
if tag =~ /\A([^\s]+)( .*)?\Z/m
name = $1
doc = $2 ? ': ' + $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_context(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_context(tag, formatter, position)
if tag =~ /\A([^\s]+)/m
name = $1
return formatter.format("`this` : {@link #{name}}")
else
JsDuck::Logger.warn(nil, 'Unexpected @this argument: "' + tag + '"', position)
return tag
end
end
end
external.js 0000666 00000001575 15133474070 0006744 0 ustar 00 /**
* @class mw.Api
* @source <https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw.Api>
*/
/**
* @class mw.Message
* @source <https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw.Message>
*/
/**
* @class mw.Title
* @source <https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw.Title>
*/
/**
* @class mw.widgets.TitleInputWidget
* @source <https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw.widgets.TitleInputWidget>
*/
/**
* @class mw.widgets.MediaSearchWidget
* @source <https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw.widgets.MediaSearchWidget>
*/
/**
* @class mw.widgets.MediaResultWidget
* @source <https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw.widgets.MediaResultWidget>
*/
/**
* @class VisualEditorOverlay
* @source <https://doc.wikimedia.org/MobileFrontend/master/js/VisualEditorOverlay.html>
*/
mw-categories.json 0000666 00000003323 15133474070 0010216 0 ustar 00 [
{
"name": "VisualEditor (MediaWiki extension)",
"groups": [
{
"name": "Initialization",
"classes": [
"mw.libs.ve*",
"ve.init.mw*"
]
},
{
"name": "Switching",
"classes": [
"mw.libs.ve.MWEditMode*Tool"
]
},
{
"name": "User Interface",
"classes": [
"ve.ui.MWAriaDescribe",
"ve.ui.MW*Action",
"ve.ui.MW*Command",
"ve.ui.MW*ContextItem",
"ve.ui.MW*Dialog",
"ve.ui.MW*Element",
"ve.ui.MW*Factory",
"ve.ui.MW*Inspector",
"ve.ui.MW*Layout",
"ve.ui.MW*Page",
"ve.ui.MW*Registry",
"ve.ui.MW*Surface",
"ve.ui.MW*Tool",
"ve.ui.MW*ToolGroup",
"ve.ui.MW*TransferHandler",
"ve.ui.MW*Widget",
"ve.ui.MW*Window"
]
},
{
"name": "Visual Diffing",
"classes": [
"ve.dm.VisualDiff",
"ve.DiffMatchPatch",
"ve.DiffTreeNode",
"ve.ui.DiffDialog",
"ve.ui.DiffElement"
]
},
{
"name": "Data Model",
"classes": [
"ve.dm.MW*Annotation",
"ve.dm.MW*MetaItem",
"ve.dm.MW*Model",
"ve.dm.MW*Node",
"ve.dm.MW*Surface",
"ve.dm.MW*SurfaceFragment"
]
},
{
"name": "ContentEditable",
"classes": [
"ve.ce.MW*Annotation",
"ve.ce.MW*Node",
"ve.ce.MW*Surface"
]
}
]
},
{
"name": "VisualEditor (core) unused parts",
"groups": [
{
"name": "Standalone",
"classes": [
"ve.init.sa*"
]
}
]
},
{
"name": "Upstream (MediaWiki)",
"groups": [
{
"name": "MediaWiki",
"classes": [
"mw.Api",
"mw.Message",
"mw.Title",
"mw.widgets.*Widget"
]
},
{
"name": "MobileFrontend",
"classes": [
"VisualEditorOverlay"
]
}
]
}
]
Back to Directory
File Manager