A set of React libraries to be used in monorepo apps.
Please find our demo app for examples.
- @prefabs.tech/react-config (https://www.npmjs.com/package/@prefabs.tech/react-config)
- @prefabs.tech/react-i18n (https://www.npmjs.com/package/@prefabs.tech/react-i18n)
- @prefabs.tech/react-user (https://www.npmjs.com/package/@prefabs.tech/react-user)
- @prefabs.tech/react-ui (https://www.npmjs.com/package/@prefabs.tech/react-ui)
- @prefabs.tech/react-layout (https://www.npmjs.com/package/@prefabs.tech/react-layout)
Install dependencies recursively with this command
make install
make build
make lint
make typecheck
make test
The best way to verify the changes done to the libraries is to test them locally before releasing them. To test libraries locally link each libraries to the react-app using pnpm link command. More on pnpm link.
To link and unlink the library locally run these commands from the react-app where you are linking the library:
pnpm link ./<path_to_libraries_monorepo>/packages/<library_name>
To unlink the linked library
pnpm unlink ./<path_to_libraries_monorepo>/packages/<library_name>
make demo
- Make sure that
package.jsonandpnpm-lock.ymlare synchronized. - You may need to restart your react-app before link and unlink to see the changes.
- All the libraries that defines or uses context has to be linked in order to link one libraries that use the context or defines it.