Skip to content

agriculturegovau/ag-common

Repository files navigation

@ag.ds-common

A set of common components for the Department of Agriculture, powered by the Agriculture Design System (AgDS)

Contributing

System dependencies

To run the dev and builds in this repository you will need a recent version of Node.js installed (>16) and the yarn (v1) package manager.

We recommend using nvm to manage node versions: https://github.com/nvm-sh/nvm

Getting started

  1. Clone the repo to your local machine
  2. cd into the repo and run yarn to install and link dependencies.

For development run one or more of the following commands:

  • yarn storybook:dev – start storybook

Docs site

Deployment of the Docs site is handled by github actions. The site is deployed automatically anytime changes are merged to the main branch.

You can run the builds locally for testing.

yarn storybook:build

NOTE: If you see an error during the build like the following:

> Build error occurred
Error: ENOENT: no such file or directory, open '.../packages/logo/package.json'

Check if the package has been removed or renamed. If so you may need to delete the folder.

Adding new components

When adding a new component please make sure you do all of the following

  • run preconstruct init
  • create stories for all variants
  • add a README.md