OpenChemistry / oc-web-components

Web components supporting the Open Chemistry project
BSD 3-Clause "New" or "Revised" License
8 stars 11 forks source link

oc-web-components

CircleCI Status lerna

Lerna monorepo containing Open Chemistry npm packages.

Table of Contents

Packages

@openchemistry/types npm package
@openchemistry/utils npm package
@openchemistry/moljs-es npm package
@openchemistry/molecule-moljs npm package
@openchemistry/molecule-vtkjs npm package
@openchemistry/molecule-menu npm package
@openchemistry/volume-controls npm package
@openchemistry/vibrational-spectrum npm package
@openchemistry/molecule npm package
@openchemistry/energy-plot npm package
@openchemistry/sample-data npm package
@openchemistry/girder-client npm package
@openchemistry/girder-redux npm package
@openchemistry/girder-ui npm package
@openchemistry/rest npm package
@openchemistry/redux npm package
@openchemistry/sagas npm package

@openchemistry/types

@openchemistry/utils

@openchemistry/moljs-es

@openchemistry/molecule-moljs

@openchemistry/molecule-vtkjs

@openchemistry/volume-controls

@openchemistry/molecule-menu

@openchemistry/vibrational-spectrum

@openchemistry/molecule

@openchemistry/energy-plot

@openchemistry/sample-data

@openchemistry/girder-client

@openchemistry/girder-redux

@openchemistry/girder-ui

@openchemistry/rest

@openchemistry/redux

@openchemistry/sagas

Build

To build all the packages in the monorepo, follow the steps below.

Clone the repository:

git clone git@github.com:OpenChemistry/oc-web-components.git

Install the monorepo dependencies and bootstrap the various packages:

cd oc-web-components
yarn install
yarn run bootstrap

Build the packages:

yarn run build

Develop

To use the local dev version of the Open Chemistry packages within the mongochem project follow the steps below.

NOTE: When linking the packages in development, yarn must be used instead of npm.

Build all the packages in the monorepo. See instructions above.

Create local links for all the packages:

# From the oc-web-components root directory

export OPENCHEMISTRY_PACKAGES=$(ls packages)

for package in $OPENCHEMISTRY_PACKAGES; do \
  cd packages/${package} && \
  yarn unlink && \
  yarn link && \
  cd ../../
done;

Consume the linked packages in the mongochemclient:

# From the mongochemclient root directory

yarn install

for package in $OPENCHEMISTRY_PACKAGES; do \
  yarn link @openchemistry/${package}
done;

yarn run start