mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-12-03 18:26:16 +00:00
Add scaffolding for skin
Change-Id: Ie9420dc85f658fa21a1524dca9374cb1e14fcad7
This commit is contained in:
parent
e6a51f136d
commit
2a70a13b69
21
.eslintrc.json
Normal file
21
.eslintrc.json
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"extends": "wikimedia",
|
||||
"env": {
|
||||
"browser": true,
|
||||
"jquery": true,
|
||||
"qunit": true
|
||||
},
|
||||
"globals": {
|
||||
"OO": false,
|
||||
"mw": false,
|
||||
"Hogan": false,
|
||||
"require": false
|
||||
},
|
||||
"rules": {
|
||||
"dot-notation": [ "error", { "allowKeywords": true } ],
|
||||
"object-property-newline": "error",
|
||||
"computed-property-spacing": 0,
|
||||
"no-use-before-define": 0,
|
||||
"no-underscore-dangle": 0
|
||||
}
|
||||
}
|
11
.stylelintrc
Normal file
11
.stylelintrc
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"extends": "stylelint-config-wikimedia",
|
||||
"rules": {
|
||||
"declaration-no-important": null,
|
||||
"property-blacklist": [
|
||||
"background-size"
|
||||
],
|
||||
"selector-list-comma-newline-after": null,
|
||||
"selector-no-id": null
|
||||
}
|
||||
}
|
61
Gruntfile.js
Normal file
61
Gruntfile.js
Normal file
|
@ -0,0 +1,61 @@
|
|||
/* eslint-env node */
|
||||
module.exports = function ( grunt ) {
|
||||
var conf = grunt.file.readJSON( 'skin.json' );
|
||||
|
||||
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
||||
grunt.loadNpmTasks( 'grunt-contrib-watch' );
|
||||
grunt.loadNpmTasks( 'grunt-eslint' );
|
||||
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
||||
grunt.loadNpmTasks( 'grunt-notify' );
|
||||
grunt.loadNpmTasks( 'grunt-stylelint' );
|
||||
|
||||
grunt.initConfig( {
|
||||
eslint: {
|
||||
all: [
|
||||
'**/*.js',
|
||||
'!libs/**',
|
||||
'!vendor/**',
|
||||
'!docs/**',
|
||||
'!node_modules/**'
|
||||
]
|
||||
},
|
||||
stylelint: {
|
||||
options: {
|
||||
syntax: 'less'
|
||||
},
|
||||
all: [
|
||||
'minerva.less/**/*.less',
|
||||
'resources/**/*.less'
|
||||
]
|
||||
},
|
||||
watch: {
|
||||
lint: {
|
||||
files: [ 'resources/**/*.js', 'tests/qunit/**/*.js' ],
|
||||
tasks: [ 'lint' ]
|
||||
},
|
||||
scripts: {
|
||||
files: [ 'resources/**/*.js', 'tests/qunit/**/*.js' ],
|
||||
tasks: [ 'test' ]
|
||||
},
|
||||
configFiles: {
|
||||
files: [ 'Gruntfile.js' ],
|
||||
options: {
|
||||
reload: true
|
||||
}
|
||||
}
|
||||
},
|
||||
banana: conf.MessagesDirs,
|
||||
jsonlint: {
|
||||
all: [
|
||||
'*.json',
|
||||
'**/*.json',
|
||||
'!node_modules/**'
|
||||
]
|
||||
}
|
||||
} );
|
||||
|
||||
grunt.registerTask( 'lint', [ 'eslint', 'jsonlint', 'banana' ] );
|
||||
grunt.registerTask( 'test', [ 'lint' ] );
|
||||
|
||||
grunt.registerTask( 'default', [ 'test' ] );
|
||||
};
|
14
MinervaNeue.php
Normal file
14
MinervaNeue.php
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
|
||||
if ( function_exists( 'wfLoadSkin' ) ) {
|
||||
wfLoadSkin( 'MinervaNeue' );
|
||||
// Keep i18n globals so mergeMessageFileList.php doesn't break
|
||||
$wgMessagesDirs['MinervaNeue'] = __DIR__ . '/i18n';
|
||||
/* wfWarn(
|
||||
'Deprecated PHP entry point used for Vector skin. Please use wfLoadSkin instead, ' .
|
||||
'see https://www.mediawiki.org/wiki/Extension_registration for more details.'
|
||||
); */
|
||||
return true;
|
||||
} else {
|
||||
die( 'This version of the MinervaNeue skin requires MediaWiki 1.25+' );
|
||||
}
|
7
i18n/en.json
Normal file
7
i18n/en.json
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"@metadata": {
|
||||
"authors": [ "Jdlrobson" ]
|
||||
},
|
||||
"skinname-minerva-neue": "Minerva",
|
||||
"minerva-neue-skin-desc": "A responsive powerful JavaScript based skin as used in Wikimedia's mobile projects"
|
||||
}
|
7
i18n/qqq.json
Normal file
7
i18n/qqq.json
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"@metadata": {
|
||||
"authors": [ "Jdlrobson" ]
|
||||
},
|
||||
"skinname-minerva-neue": "{{optional}}",
|
||||
"minerva-neue-skin-desc": "{{desc|what=skin|name=MinervaNeue|url=https://www.mediawiki.org/wiki/Skin:MinervaNeue}}"
|
||||
}
|
20
package.json
Normal file
20
package.json
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"test": "grunt test"
|
||||
},
|
||||
"dependencies": {
|
||||
"svgo": ">=0.4.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint-config-wikimedia": "0.3.0",
|
||||
"grunt": "^1.0.1",
|
||||
"grunt-banana-checker": "^0.5.0",
|
||||
"grunt-contrib-watch": "^1.0.0",
|
||||
"grunt-eslint": "19.0.0",
|
||||
"grunt-jsonlint": "^1.1.0",
|
||||
"grunt-notify": "^0.4.5",
|
||||
"grunt-stylelint": "^0.6.0",
|
||||
"stylelint-config-wikimedia": "^0.3.0"
|
||||
}
|
||||
}
|
36
skin.json
Normal file
36
skin.json
Normal file
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"AutoloadClasses": {},
|
||||
"ConfigRegistry": {
|
||||
"minerva-neue": "GlobalVarConfig::newInstance"
|
||||
},
|
||||
"Hooks": {},
|
||||
"MessagesDirs": {
|
||||
"MinervaNeue": [
|
||||
"i18n"
|
||||
]
|
||||
},
|
||||
"ResourceFileModulePaths": {
|
||||
"localBasePath": "",
|
||||
"remoteSkinPath": "MinervaNeue"
|
||||
},
|
||||
"ResourceModuleSkinStyles": {
|
||||
"minerva-neue": {}
|
||||
},
|
||||
"ResourceModules": {},
|
||||
"ValidSkinNames": {
|
||||
"minerva": "Minerva"
|
||||
},
|
||||
"author": [],
|
||||
"callback": "MinervaHooks::onRegistration",
|
||||
"config": {},
|
||||
"descriptionmsg": "minerva-neue-skin-desc",
|
||||
"license-name": "GPL-2.0+",
|
||||
"manifest_version": 1,
|
||||
"name": "MinervaNeue",
|
||||
"namemsg": "skinname-minerva-neue",
|
||||
"requires": {
|
||||
"MediaWiki": ">= 1.25.0"
|
||||
},
|
||||
"type": "skin",
|
||||
"url": "https://www.mediawiki.org/wiki/Skin:MinervaNeue"
|
||||
}
|
Loading…
Reference in a new issue