Overview
Setup
Clone ExodusOSS/hydra :
git clone https://github.com/ExodusOSS/hydra.git
Creating a new package
Run yarn generate
to see a list of available templates and scaffold a library/feature/module/etc.
Code Snippets
Are you tired of repeatedly typing the same scaffold code? This can be especially cumbersome when working on IOC definitions. But fret not, we’ve got you covered! Hydra offers a custom snippet extension for VSCode, elevating your coding experience. Simply execute the following command at the root:
./node_modules/.bin/lerna run setup --scope vscode-snippets
You can explore the complete list of available code snippets here .
Linking
While developing a package in this monorepo, you may want to test it in a repo that consumes it. Unfortunately we can’t use npm link
because mobile’s packager metro
doesn’t support symlinks (yet). However, we have a similar tool here to help you sync your changes to the client repos before you publish a new version.
To link your module to a client repo, run:
npm run -T sync module-name,other-module-name /path/to/client-repo
This will start a watch process that syncs the specified modules to src/node_modules
in that repo.
Test
npm run test --scope @exodus/fiat-client
Build
If your module needs transpiling (i.e. Babel or Typescript) before publishing, make sure to add
a build
script to the package.json
of the module.
Build all:
npm run build
Build one:
npm run build --scope @exodus/fiat-client