This repository contains utility packages for ImmuneSpace frontend development. All of these packages are published on npm under the @immunespace scope. Modeled and dependent on the labkey-ui-components repository.
Packages defined in this repo are intended for use in React-based modules in LabKeyModules. Therefore, development should be closely tied to development of LabKeyModules.
To make changes:
- Create a feature branch. Call it something descriptive like
fb_newcomponent
. - If you will be making related changes in LabKeyModules, create a
fb_newcomponent
branch in that repo too. Refer to the LabKeyModules contribution guidelines. If needed, create a feature branch in UITesting as well. - Make changes in the package you want to update. Refer to the README for that package for any specific contribution guidelines. If you want to test your changes in LabKeyModules before publishing there are several options:
- copy files into
LabKeyModules/node_modules
and build (usingnpm build
notgradle deploy
) - Edit
LabKeyModules/package.json
or a project-specificpackage.json
(egLabKeyModules/DataFinder/package.json
) dependencies to look at local file. eg:"@immunespace/components": "file:~/Projects/ImmuneSpaceFrontendTools/components"
. This creates a symlink innode_modules
to that directory. If you do this, remember to change it back before committing!
- copy files into
- Publish an alpha version of the package of the form
X.Y.Z-fb-newcomponent.0
. Increment the beta version as you develop. Tag this version with the name of the branch:npm version 1.0.0-fb-newcomponent.0 npm publish --tag fb_newcomponent
- Install that version in your local
LabKeyModules
and build.npm install --save @immunespace/components@fb_newcomponent gradle deploy
- When you are happy with your changes, make sure all tests are passing (Including UITesting)
- Submit PRs to the
dev
branch for this package, LabKeyModules, UITesting, and any other related packages and request a review. - Merge PRs into
dev
branch. Update version number to a patch version (instead of beta version) and publish withdev
tag. Remove the tag from npm vianpm dist-tag rm @immunespace/components fb_newcomponent
. - Submit
dev
->master
PRs.dev
->master
PRs must pass all tests and go through code reveiw. - Swap out the
dev
tag for thelatest
tag in the final version.npm dist-tag rm @immunespace/components dev npm dist-tag add @immunespace/components@<latest version> latest
Refer to LabKey's documentation for more docs on developing React modules.
This is the general module structure:
ModuleName
├── resources/
├── src/
│ └── client
│ ├── ViewName/
│ │ ├── components/
│ │ ├── helpers/
│ │ ├── ViewName.scss
│ │ ├── ViewName.tsx
│ │ ├── app.tsx
│ │ └── dev.tsx
│ ├── tests/
│ ├── theme
│ │ ├── _ModuleName.scss
│ │ └── style.js
│ └── typings
├── README.md
├── build.gradle
├── module.properties
└── package.json
Dependencies shared across modules are defined in LabKeyModules/package.json
. Any dependencies that are specific to a module should be defined in that module-specific package.json
.
Packages defined in this repo are intended for use in React-based modules in LabKeyModules.