Skip to content

Commit

Permalink
Move generic React components to Open Discovery platform.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
epatters committed Oct 26, 2017
1 parent f9aa887 commit eab696d
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 87 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
"@types/react-router-dom": "^4.0.8",
"cytoscape": "3.1.5",
"lodash": "^4.17.4",
"open-discovery": "file:.yalc/open-discovery",
"open-discovery-components": "file:.yalc/open-discovery-components",
"pouchdb": "^6.2.0",
"pouchdb-find": "^6.2.0",
"react": "^16.0.0",
Expand All @@ -40,4 +42,4 @@
"style-loader": "^0.18.2",
"typescript": "^2.5.3"
}
}
}
36 changes: 0 additions & 36 deletions src/components/cytoscape.tsx

This file was deleted.

48 changes: 0 additions & 48 deletions src/components/search_bar.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/pages/annotation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Grid, Col } from "react-bootstrap";
import { Annotation, PythonAnnotation, PythonObject, PythonMorphism,
AnnotationCache } from "data-science-ontology";
import { Cytoscape, SExp } from "open-discovery";
import { CytoscapeComponent } from "../components/cytoscape";
import { CytoscapeComponent } from "open-discovery-components";
import * as Services from "../services";

import "../../style/pages/annotation.css";
Expand Down
2 changes: 1 addition & 1 deletion src/pages/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import * as Router from "react-router-dom";
import FontAwesome = require("react-fontawesome");

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

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

Expand Down
15 changes: 15 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
version "4.14.74"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.74.tgz#ac3bd8db988e7f7038e5d22bd76a7ba13f876168"

"@types/lodash@^4.14.72":
version "4.14.80"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.80.tgz#a6b8b7900e6a7dcbc2e90d9b6dfbe3f6a7f69951"

"@types/node@*":
version "8.0.34"
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.34.tgz#55f801fa2ddb2a40dd6dfc15ecfe1dde9c129fe9"
Expand Down Expand Up @@ -1857,6 +1861,13 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0:
dependencies:
wrappy "1"

"open-discovery@file:.yalc/open-discovery":
version "0.1.0-610f7036"
dependencies:
"@types/lodash" "^4.14.72"
lodash "^4.17.4"
striptags "^3.0.1"

os-homedir@^1.0.0, os-homedir@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
Expand Down Expand Up @@ -2871,6 +2882,10 @@ strip-json-comments@~2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"

striptags@^3.0.1:
version "3.1.0"
resolved "https://registry.yarnpkg.com/striptags/-/striptags-3.1.0.tgz#763e534338d9cf542f004a4b1eb099e32d295e44"

style-loader@^0.18.2:
version "0.18.2"
resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.18.2.tgz#cc31459afbcd6d80b7220ee54b291a9fd66ff5eb"
Expand Down

0 comments on commit eab696d

Please sign in to comment.