-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Init from 0e48ddffe7ca5b0889b07ed4f1dd9294b72a8787
- Loading branch information
0 parents
commit 8d75b90
Showing
8 changed files
with
526 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/vendor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"camelcase": true, | ||
"curly": true, | ||
"eqeqeq": true, | ||
"immed": true, | ||
"latedef": true, | ||
"newcap": true, | ||
"supernew": true, | ||
"shadow": true, | ||
"noarg": true, | ||
"noempty": true, | ||
"nonew": true, | ||
"quotmark": "single", | ||
"trailing": true, | ||
"undef": true, | ||
"unused": "vars", | ||
"laxbreak": true, | ||
"laxcomma": false, | ||
"onevar": false, | ||
"bitwise": false, | ||
"forin": false, | ||
"regexp": false, | ||
"strict": true, | ||
"scripturl": true, | ||
|
||
// Environment | ||
"browser": true, | ||
|
||
// Globals | ||
"predef": [ | ||
"dataValues", | ||
"globeCoordinate", | ||
"jQuery", | ||
"mediaWiki", | ||
"QUnit", | ||
"valueFormatters", | ||
"valueParsers", | ||
"time", | ||
"util", | ||
// require.js globals: | ||
"require", | ||
"requirejs", | ||
"define" | ||
] | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Wikibase datamodel serialization implementation in JavaScript | ||
|
||
## Release notes | ||
|
||
### 1.0.0 (2014-07-03) | ||
|
||
Initial release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"name": "wikibase/serialization-javascript", | ||
"description": "Wikibase datamodel serialization implementation in JavaScript", | ||
"require": { | ||
"data-values/javascript": "~0.5.0", | ||
"wikibase/data-model-javascript": "~0.2.0" | ||
}, | ||
"license": "GPL-2.0+", | ||
"authors": [ | ||
{ | ||
"name": "Daniel Werner", | ||
"homepage": "https://www.mediawiki.org/wiki/User:Danwe" | ||
}, | ||
{ | ||
"name": "H. Snater", | ||
"homepage": "http://www.snater.com" | ||
}, | ||
{ | ||
"name": "Jeroen De Dauw", | ||
"email": "jeroendedauw@gmail.com", | ||
"homepage": "http://jeroendedauw.com" | ||
}, | ||
{ | ||
"name": "Adrian Lang", | ||
"email": "adrian.lang@wikimedia.de" | ||
} | ||
], | ||
"minimum-stability": "dev", | ||
"support": { | ||
"issues": "https://bugzilla.wikimedia.org/", | ||
"irc": "irc://irc.freenode.net/wikidata" | ||
}, | ||
"autoload": { | ||
"files" : [ | ||
"init.mw.php" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
|
||
include 'resources.mw.php'; | ||
include 'resources.test.mw.php'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
|
||
/** | ||
* File for Wikibase resourceloader modules. | ||
* | ||
* @since 0.2 | ||
* | ||
* @licence GNU GPL v2+ | ||
* @author Daniel Werner | ||
* @author H. Snater < mediawiki@snater.com > | ||
* | ||
* @codeCoverageIgnoreStart | ||
*/ | ||
return call_user_func( function() { | ||
global $wgResourceModules; | ||
|
||
preg_match( | ||
'+^(.*?)' . preg_quote( DIRECTORY_SEPARATOR ) . '(vendor|extensions)' . | ||
preg_quote( DIRECTORY_SEPARATOR ) . '(.*)$+', | ||
__DIR__, | ||
$remoteExtPathParts | ||
); | ||
|
||
$moduleTemplate = array( | ||
'localBasePath' => __DIR__, | ||
'remoteExtPath' => '../' . $remoteExtPathParts[2] . DIRECTORY_SEPARATOR . $remoteExtPathParts[3], | ||
); | ||
|
||
$modules = array( | ||
'wikibase.serialization' => $moduleTemplate + array( | ||
'scripts' => array( | ||
'src/serialization.js', | ||
'src/serialization.Serializer.js', | ||
'src/serialization.Unserializer.js', | ||
'src/serialization.SerializerFactory.js', | ||
), | ||
'dependencies' => array( | ||
'util.inherit', | ||
'wikibase', | ||
) | ||
), | ||
|
||
'wikibase.serialization.entities' => $moduleTemplate + array( | ||
'scripts' => array( | ||
'src/serialization.EntityUnserializer.js', | ||
'src/serialization.EntityUnserializer.propertyExpert.js', | ||
), | ||
'dependencies' => array( | ||
'util.inherit', | ||
'wikibase.serialization', | ||
'wikibase.datamodel', | ||
) | ||
), | ||
); | ||
|
||
$wgResourceModules = array_merge( $wgResourceModules, $modules ); | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
global $wgHooks; | ||
|
||
$wgHooks['ResourceLoaderTestModules'][] = function( array &$testModules, \ResourceLoader &$resourceLoader ) { | ||
preg_match( | ||
'+^(.*?)' . preg_quote( DIRECTORY_SEPARATOR ) . '(vendor|extensions)' . | ||
preg_quote( DIRECTORY_SEPARATOR ) . '(.*)$+', | ||
__DIR__, | ||
$remoteExtPathParts | ||
); | ||
|
||
$moduleTemplate = array( | ||
'localBasePath' => __DIR__, | ||
'remoteExtPath' => '../' . $remoteExtPathParts[2] . DIRECTORY_SEPARATOR . $remoteExtPathParts[3], | ||
); | ||
|
||
// FIXME: No tests here | ||
$testModules['qunit']['wikibase.serialization.tests'] = $moduleTemplate + array( | ||
'scripts' => array( | ||
), | ||
'dependencies' => array( | ||
) | ||
); | ||
|
||
return true; | ||
}; |