@ovis-technologies/ovis-blueprint
v4.0.3
Published
Ovis Technologies React Component Library
Readme
Ovis Blueprint
A React Component library built by ovis technologies.
Installation
$ yarn add @ovis-technologies/ovis-blueprintContributing
TODO: Contribution documention and release info. Include changelog, publish, and versioning instructions.
Development
Once you have cloned the package. Run yarn install (not npm) to install package dependencies.
$ cd ovis-blueprint-library
$ yarn installStorybook
You can develop within Storybook, which will also run the component documentation:
$ yarn storybookProject development
Alternatively, there are times where we want to see how your changes work within a local project using the package as a dependency.
- Set a global symlink to the package. At the root of
ovis-blueprint-libraryrun:
$ yarn link- At the root of your project directory or same level as
package.json
$ yarn link "@ovis-technologies/ovis-blueprint"- Run bundler to compile to vanilla JS.
$ yarn startChanges should now cause a new build and in turn, your projects hot-reloader should recognize the change as well!
Note - The package will automatically assume you are developing for the Haven project as well as having /ovis-blueprint-library at the same level directory:
/any-folder
├── /sanc-haven-fe
└── /ovis-blueprint-libraryThis is so we can leverage React hooks by using the same version of React as your project. If you want are developing for a different project, or Haven is in a different directory you will have to run:
$ yarn run link:react <path/to/project>You should see a change under devDependencies in package.json for react linking to your desired project's node_modules. Please avoid commiting this change.
Troubleshooting
Duplicate React or Hook errors:
Confirm your devDependencies for react is pointing to the project's version of React: react: link:../path/to/project/node_modules/react
Package Errors:
If for whatever your link to React broke or you are trying to reinstall you can run:
$ yarn run resetThis will uninstall your node_modules and install fresh; which is a good place to start with weird package erros.
Unlinking:
Unlike npm which a simple deletion of node_modules and reinstall can help correct a link issue, with yarn you will have to unlink because the link persists. At the root of ovis-blueprint-library run:
yarn unlink
