Skip to content

Commit eab696d

Browse files
committed
Move generic React components to Open Discovery platform.
Also, begin switch from npm/yarn link to yalc for local dependencies. Npm link is broken in so many ways. It's really embarassing that sharing React components between multiple apps is still so difficult. npm/npm#17287 microsoft/TypeScript#6496 facebook/create-react-app#1492
1 parent f9aa887 commit eab696d

File tree

6 files changed

+20
-87
lines changed

6 files changed

+20
-87
lines changed

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
"@types/react-router-dom": "^4.0.8",
2323
"cytoscape": "3.1.5",
2424
"lodash": "^4.17.4",
25+
"open-discovery": "file:.yalc/open-discovery",
26+
"open-discovery-components": "file:.yalc/open-discovery-components",
2527
"pouchdb": "^6.2.0",
2628
"pouchdb-find": "^6.2.0",
2729
"react": "^16.0.0",
@@ -40,4 +42,4 @@
4042
"style-loader": "^0.18.2",
4143
"typescript": "^2.5.3"
4244
}
43-
}
45+
}

src/components/cytoscape.tsx

-36
This file was deleted.

src/components/search_bar.tsx

-48
This file was deleted.

src/pages/annotation.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Grid, Col } from "react-bootstrap";
66
import { Annotation, PythonAnnotation, PythonObject, PythonMorphism,
77
AnnotationCache } from "data-science-ontology";
88
import { Cytoscape, SExp } from "open-discovery";
9-
import { CytoscapeComponent } from "../components/cytoscape";
9+
import { CytoscapeComponent } from "open-discovery-components";
1010
import * as Services from "../services";
1111

1212
import "../../style/pages/annotation.css";

src/pages/search.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import * as Router from "react-router-dom";
33
import FontAwesome = require("react-fontawesome");
44

55
import { Config, Concept, Annotation } from "data-science-ontology";
6+
import { SearchBar } from "open-discovery-components";
67
import * as Cloudant from "../cloudant";
7-
import { SearchBar } from "../components/search_bar";
88

99
import "../../style/pages/search.css";
1010

yarn.lock

+15
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
version "4.14.74"
1515
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.74.tgz#ac3bd8db988e7f7038e5d22bd76a7ba13f876168"
1616

17+
"@types/lodash@^4.14.72":
18+
version "4.14.80"
19+
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.80.tgz#a6b8b7900e6a7dcbc2e90d9b6dfbe3f6a7f69951"
20+
1721
"@types/node@*":
1822
version "8.0.34"
1923
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.34.tgz#55f801fa2ddb2a40dd6dfc15ecfe1dde9c129fe9"
@@ -1857,6 +1861,13 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0:
18571861
dependencies:
18581862
wrappy "1"
18591863

1864+
"open-discovery@file:.yalc/open-discovery":
1865+
version "0.1.0-610f7036"
1866+
dependencies:
1867+
"@types/lodash" "^4.14.72"
1868+
lodash "^4.17.4"
1869+
striptags "^3.0.1"
1870+
18601871
os-homedir@^1.0.0, os-homedir@^1.0.1:
18611872
version "1.0.2"
18621873
resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
@@ -2871,6 +2882,10 @@ strip-json-comments@~2.0.1:
28712882
version "2.0.1"
28722883
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
28732884

2885+
striptags@^3.0.1:
2886+
version "3.1.0"
2887+
resolved "https://registry.yarnpkg.com/striptags/-/striptags-3.1.0.tgz#763e534338d9cf542f004a4b1eb099e32d295e44"
2888+
28742889
style-loader@^0.18.2:
28752890
version "0.18.2"
28762891
resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.18.2.tgz#cc31459afbcd6d80b7220ee54b291a9fd66ff5eb"

0 commit comments

Comments
 (0)