@civicactions/data-catalog-components
v1.18.0
Published
React Components for Open Data Catalogs.
Downloads
722
Readme
Data Catalog Components
A set of React components to facilitate the creation of Open Data Catalogs with React. This library is powered by Parcel.
Local Development
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.
Viewing the Components
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
Docz preview
- Comment out
base: '/data-catalog-components'
from doczrc.js - Run
npm run docz:serve
then visithttp://localhost:3000
.
Publishing
- Review exports in index.js
- Increase version in package.json
- run
npm login
- run
npm publish --access public
Publish to Github Pages
- run
npm run prepublish; npm run deploy-storybook
Testing Components without Updating NPM Package
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