Skip to content
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

Importing GTEx visualisations using Javascript modules #217

Open
gijskant opened this issue Mar 26, 2019 · 0 comments
Open

Importing GTEx visualisations using Javascript modules #217

gijskant opened this issue Mar 26, 2019 · 0 comments

Comments

@gijskant
Copy link

We realy like the GTEx visualisations to summarize transcript-level or gene-level expression data for tissues.
We would like to integrate some components in another frontend project (which is not open source), using React.
An initial version of a React library, currently only containing the transcript browser, is available: thehyve/react-gtex-viz.

For embedding the visualisations in a React component, it is convenient if the gtex-viz library is available as a Javascript module, e.g., in ES or CommonJS format. Since you are already using rollup for bundling, that could be added to the existing rollup configuration.
We have a proposal for changes to the rollup configuration and some other minor adaptations here: thehyve@a30302f.
It involves:

  • renaming all references to jQuery from $ to jQuery and marking jQuery as an external module explicitely;
  • adding an exported object to each visualisation file, so that, e.g., TranscriptBrowser.render can be referenced;
  • add an index.js an rollup/rollup.config.js to define the module; can be triggerd with npm run build, npm run build-prod;
  • updated the demo HTML files for local use.

Could you please give feedback on this approach? Are you interested in merging such changes and do you have suggestions for improvements?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant