Commit 70537a35 authored by Robert Nix's avatar Robert Nix

Merge branch 'feature/mw-1.33-mobilefrontend' into 'master'

Update MobileFrontend to 1.33

See merge request !55
parents 8ed853ed f22a1e5f

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

{
"presets": [ "@babel/preset-env" ]
}
# See Grade A in resource loader startup module mediawikicore resources/src/startup/startup.js
# https//en.wikipedia.org/wiki/Google_Chrome_version_history
chrome 13
ie 11
# https//en.wikipedia.org/wiki/Firefox_version_history
firefox 4.0
safari 5.0
opera 15
ios 6.0
android 4.1
# Custom tags for JSDuck 5.x
# Originally implemented of VisualEditor-Team:
# https://github.com/wikimedia/mediawiki-extensions-VisualEditor/blob/master/.docs/CustomTags.rb
# 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 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
/docs/
/libs/
/resources/dist/
/vendor/
{
"extends": "wikimedia",
"root": true,
"extends": [
"wikimedia",
".eslintshared.json"
],
"env": {
"browser": true,
"qunit": true,
"jquery": false
"browser": true
},
"globals": {
"OO": false,
"mw": false,
"Hogan": false,
"require": false
},
"rules": {
"no-restricted-properties": [2,
{
"object": "window",
"property": "history",
"message": "Please use mediawiki.router"
},
{
"object": "window",
"property": "location",
"message": "Please use mediawiki.router"
}
],
"dot-notation": [ "error", { "allowKeywords": true } ],
"object-property-newline": "error",
"computed-property-spacing": 0,
"no-use-before-define": 0,
"no-underscore-dangle": 0
"OO": "readable",
"mw": "readable"
}
}
{
"extends": "wikimedia/jquery",
"globals": {
"$": "off"
},
"rules": {
"no-restricted-properties": [2,
{
"property": "done",
"message": "The method `done` if used with Deferred objects is incompatible with ES6 Promises. Please use `then`."
},
{
"property": "fail",
"message": "The method `fail` if used with Deferred objects is incompatible with ES6 Promises. Please use `then`."
},
{
"property": "always",
"message": "The method `always` if used with Deferred objects is incompatible with ES6 Promises. Please use `then`."
},
{
"object": "window",
"property": "history",
"message": "Please use mediawiki.router"
},
{
"object": "window",
"property": "location",
"message": "Please use mediawiki.router"
}
],
"object-property-newline": "error",
"computed-property-spacing": "off",
"no-use-before-define": "off",
"no-underscore-dangle": "off",
"jquery/no-global-selector": "off"
}
}
......@@ -5,7 +5,8 @@
.idea/
node_modules/
tmp/
/docs
/docs/js/
/docs/php/
dev-scripts/remotes
/vendor
/composer.lock
......@@ -13,3 +14,6 @@ dev-scripts/remotes
.DS_Store
tests/report
.bundle/
resources/dist/
/.nyc_output/
/.eslintcache
[gerrit]
host=gerrit.wikimedia.org
port=29418
project=mediawiki/extensions/MobileFrontend.git
track=1
defaultrebase=0