A set of React components to facilitate the creation of Open Data Catalogs with React. This library is powered by Parcel.
For local development, we recommend using npm workspaces. Once you have a workspace directory, install this library inside your workspace along any Open Data downstream sites you wish to work on.
In the root folder for this project, run npm run watch to build local code. Ensure the upstream is using the same version number located in package.json of this repo. Start the upstream site locally as well, and it should load local code from this repo as the dependency. Parcel also provides hot rebuilding while watch is running.
This project utilizes storybook to document the available components.
To see the available components:
- clone this repo
- Install the dependencies with npm:
cd data-catalog-components
npm install
- Start storybook
npm run storybook
- Comment out
base: '/data-catalog-components'
from doczrc.js - Run
npm run docz:serve
then visithttp://localhost:3000
.
- Review exports in index.js
- Increase version in package.json
- run
npm login
- run
npm publish --access public
- run
npm run prepublish; npm run deploy-storybook
To test or use the components from a github branch:
- Create new branch locallly
- Remove
dist
from .gitignore - Run
npm run build
- Push dist folder and .gitignore to your branch
- Add branch to package.json by running
npm install --save getdkan/data-catalog-components#MY-BRANCH