The toshi-nest is for fledgling work e.g. reusable Node components to share across Kororaa and other projects
- generate a github access token with these instructions
- in your terminal, run
npm login --scope=@gns-science --registry=https://npm.pkg.github.com, and then use your github credentials to log in. - add a file in the root directory of your project called
.npmrc. - add this line to the file
@gns-science:registry=https://npm.pkg.github.com/ - in your terminal, in your project directory, run
yarn add @gns-science/toshi-nest
SelectControl
MultiSelect
ControlsBar
HazardCurves
This project uses yarn 4. See yarn installation instructions
Run yarn storybook to see all components in action.
In order to test this library in a web app, call yarn pack to create a package.tgz file, and then refer to that file in the package.json file of your project:
"dependencies": {
"@gns-science/toshi-nest": "/Code/toshi-nest/package.tgz",
....
}
After upgrading dependencies, run
yarn build
yarn test
yarn storybookIn storybook, verify that each component works. For leaflet maps, verify that the time control and the fullscreen control works.
Also check for security issues:
yarn npm audit --recursiveFor upgrading storybook, follow these instructions and do not skip major versions during an upgrade.
react-leafletis pinned to3.2.5because the TimeDimensionLayer breaks from version4.0.0on.ansi-stylesandstrip-indentare pinned at pre-ESM versions as these don't seem to work in our setup, even if mentioned intransformIgnorePatterns. This might be because some of our (transitive) dependencies expect the ESM version and some expect the CJS version of these libraries. It might be worth looking into this https://thedrlambda.medium.com/nodejs-typescript-and-the-infuriating-esm-errors-828b77e7ecd3 when we have the time.