Skip to content

Prepare the library to be released as a npm package #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Oct 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
node_modules/
vendor/
.idea/

package-lock.json
19 changes: 10 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
language: php
language: node_js

php:
- 5.5
node_js:
- 4
- 5
- 6
- 7
- 8

sudo: false

before_script:
- nvm install 4
- npm install

script: npm install && npm test
script:
- npm test

notifications:
irc:
Expand All @@ -18,7 +23,3 @@ notifications:
on_failure: always
template:
- "%{repository}/%{branch}/%{commit} : %{author} %{message} %{build_url}"

cache:
directories:
- $HOME/.composer/cache
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ at the heart of the [Wikibase software](http://wikiba.se/).

### 4.0.0 (dev)

* Made the library a pure JavaScript library.
* Removed MediaWiki ResourceLoader module definitions.
* Raised DataValues JS library version requirement to 0.10.0.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I already fixed the minor concerns I had with this in 161970d.

* Removed all Claim collections:
* Removed `ClaimGroup`
* Removed `ClaimGroupSet`
Expand Down
27 changes: 0 additions & 27 deletions composer.json

This file was deleted.

13 changes: 0 additions & 13 deletions init.php

This file was deleted.

20 changes: 10 additions & 10 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ module.exports = function ( config ) {
// Order DOES matter, as soon as we have no dependency management in JS
files: [
'node_modules/jquery/dist/jquery.js',
'vendor/data-values/javascript/src/dataValues.js',
'vendor/data-values/javascript/lib/util/util.inherit.js',
'vendor/data-values/javascript/src/DataValue.js',
'node_modules/wikibase-data-values/src/dataValues.js',
'node_modules/wikibase-data-values/lib/util/util.inherit.js',
'node_modules/wikibase-data-values/src/DataValue.js',
'src/__namespace.js',
'src/Claim.js',
'src/Entity.js',
Expand All @@ -23,13 +23,13 @@ module.exports = function ( config ) {
'src/Term.js',
'src/Set.js',
'src/List.js',
'vendor/data-values/javascript/lib/globeCoordinate/globeCoordinate.js',
'vendor/data-values/javascript/lib/globeCoordinate/globeCoordinate.GlobeCoordinate.js',
'vendor/data-values/javascript/src/valueFormatters/valueFormatters.js',
'vendor/data-values/javascript/src/valueParsers/valueParsers.js',
'vendor/data-values/javascript/src/dataValues.js',
'vendor/data-values/javascript/src/*.js',
'vendor/data-values/javascript/src/values/*.js',
'node_modules/wikibase-data-values/lib/globeCoordinate/globeCoordinate.js',
'node_modules/wikibase-data-values/lib/globeCoordinate/globeCoordinate.GlobeCoordinate.js',
'node_modules/wikibase-data-values/src/valueFormatters/valueFormatters.js',
'node_modules/wikibase-data-values/src/valueParsers/valueParsers.js',
'node_modules/wikibase-data-values/src/dataValues.js',
'node_modules/wikibase-data-values/src/*.js',
'node_modules/wikibase-data-values/src/values/*.js',
'src/*.js',
'tests/*.js'
],
Expand Down
12 changes: 0 additions & 12 deletions mediawiki-extension.json

This file was deleted.

24 changes: 22 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,31 @@
{
"name": "wikibase-data-model",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should stick to tab-indention in all .json files. But this can be fixed later.

"description": "Wikibase datamodel implementation in JavaScript",
"directories": {
"lib": "src",
"test": "tests"
},
"license": "GPL-2.0+",
"contributors": [
{
"name": "H. Snater",
"url": "http://www.snater.com"
},
{
"name": "Adrian Lang",
"email": "adrian.lang@wikimedia.de"
}
],
"repository": {
"type": "git",
"url": "https://github.com/wmde/WikibaseDataModelJavaScript"
},
"bugs": {
"url": "https://phabricator.wikimedia.org/"
},
"dependencies": {
"jquery": "^3.2.1"
"jquery": "^3.2.1",
"wikibase-data-values": "^0.10.0"
},
"devDependencies": {
"eslint": "^3.19.0",
Expand All @@ -16,7 +37,6 @@
"qunitjs": "^2.3.2"
},
"scripts": {
"postinstall": "composer install",
"test": "npm run eslint && npm run run-tests",
"eslint": "eslint .",
"run-tests": "karma start --single-run"
Expand Down
Loading