This repo contains multiple JavaScript packages linked together by Yarn Workspaces (i.e. it is a monorepo).
The source code for the library published to npm as @influxdata/giraffe
is contained in the giraffe
workspace.
The /stories workspace in this repository contains a Storybook application, which is convenient place to test changes to Giraffe.
To run the Storybook during development:
-
In a terminal,
cd
into the /stories workspace and runyarn start
. This will start a Storybook development server. -
Visit http://localhost:50000 to see the storybook. Changes made either in the library source or in the stories source will be reflected automatically at that URL.
Just looking for how to render a graph in your UI? See Getting Started in the README.md
.
To run linting, cd
into either /giraffe or /stories and run:
yarn lint
To run formatting, which uses Prettier, cd
into either /giraffe or /stories and run:
yarn prettier --fix
To see the formatting issues without fixing, run the above without the --fix
option
To run unit tests, cd
into the /giraffe or /stories and run:
yarn test
Ensure that
- You have administrator access to this repo on GitHub
- You have permissions to publish to the influxdata organization on npm
- You are logged into Yarn (
yarn login
) - You are on
master
and the working tree is clean
Then from the root of the repo, run the publish script:
./giraffe/publish
InfluxData takes security and our user's trust very seriously. If you believe you have found a security issue in any of our open source projects, please responsibly disclose it by contacting [email protected]. More details about security vulnerability reporting, including our GPG key, can be found here.