Overview
Setup
Clone ExodusOSS/hydra :
git clone https://github.com/ExodusOSS/hydra.gitCreating 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-snippetsYou 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-repoThis will start a watch process that syncs the specified modules to src/node_modules in that repo.
Test
npm run test --scope @exodus/fiat-clientBuild
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 buildBuild one:
npm run build --scope @exodus/fiat-client