Skip to content

Commit

Permalink
Build cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rsimon committed Jun 5, 2021
1 parent ff1d15e commit f0ae10c
Show file tree
Hide file tree
Showing 9 changed files with 5,581 additions and 1,725 deletions.
25 changes: 25 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"env": {
"production": {
"presets": [
[
"@babel/preset-env",
{
"modules": false
}
]
],
"plugins": [
"@babel/plugin-proposal-class-properties"
]
},
"test": {
"presets": [
"@babel/preset-env"
],
"plugins": [
"@babel/plugin-proposal-class-properties"
]
}
}
}
6,501 changes: 5,538 additions & 963 deletions package-lock.json

Large diffs are not rendered by default.

26 changes: 15 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{
"name": "@recogito/recogito-client-core",
"version": "1.1.1",
"version": "1.2.0",
"description": "Core functions, classes and components for RecogitoJS",
"main": "src/index.js",
"sideEffects": false,
"scripts": {
"test": "./node_modules/.bin/mocha --require @babel/register",
"build": "webpack --mode=production"
"test": "NODE_ENV=test ./node_modules/.bin/mocha --require @babel/register"
},
"repository": {
"type": "git",
Expand All @@ -22,16 +20,22 @@
"url": "https://github.com/recogito/recogito-client-core/issues"
},
"homepage": "https://github.com/recogito/recogito-client-core/wiki",
"devDependencies": {
"@babel/core": "^7.6.2",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/preset-env": "^7.6.2",
"@babel/register": "^7.9.0",
"mocha": "^7.1.1"
},
"dependencies": {
"downshift": "^5.4.6",
"downshift": "^6.1.3",
"fast-deep-equal": "^3.1.3",
"node-polyglot": "^2.4.0",
"preact": "^10.4.1",
"preact": "^10.5.13",
"react-autosize-textarea": "^7.1.0",
"react-select": "^3.1.1",
"react-transition-group": "^4.3.0",
"timeago-react": "^3.0.1",
"tiny-emitter": "^2.1.0",
"uuid": "^8.3.0"
"react-select": "^4.3.1",
"react-transition-group": "^4.4.2",
"timeago-react": "^3.0.2",
"uuid": "^8.3.2"
}
}
8 changes: 0 additions & 8 deletions src/index.js

This file was deleted.

25 changes: 3 additions & 22 deletions test/WebAnnotationTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ const fixtureAnnotation = {

describe("WebAnnotation", function() {
describe("#isEqual()", function() {

it("should return true if the other is the same object", () => {
const a = new WebAnnotation(fixtureAnnotation);
const b = new WebAnnotation(fixtureAnnotation);
assert(a.isEqual(b));
});

it("should return false if either annotation has no ID set", () => {
const a = new WebAnnotation({
...fixtureAnnotation,
Expand All @@ -41,27 +43,6 @@ describe("WebAnnotation", function() {
assert.strictEqual(a.isEqual(b), false);
assert.strictEqual(b.isEqual(a), false);
});
it("should return true iff annotation IDs do match", () => {
const a = new WebAnnotation({
...fixtureAnnotation,
id: "https://www.example.com/anno1"
});
const b = new WebAnnotation({
...fixtureAnnotation,
id: "https://www.example.com/anno2"
});
const c = new WebAnnotation({
...fixtureAnnotation,
id: "https://www.example.com/anno1",
body: [
{
type: "TextualBody",
value: "foobar"
}
]
});
assert.strictEqual(a.isEqual(b), false);
assert.strictEqual(a.isEqual(c), true);
});

});
});
1 change: 0 additions & 1 deletion test/highlighter/annotations.w3c.js

This file was deleted.

38 changes: 0 additions & 38 deletions test/highlighter/generate-random.js

This file was deleted.

Loading

0 comments on commit f0ae10c

Please sign in to comment.