项目作者: times

项目描述 :
A suite of libraries and React components for visuals and graphics at The Times and The Sunday Times
高级语言: JavaScript
项目地址: git://github.com/times/times-visuals.git
创建时间: 2018-11-29T17:46:12Z
项目社区:https://github.com/times/times-visuals

开源协议:BSD 3-Clause "New" or "Revised" License

下载


Times Visuals

A library of libraries and React components for building visuals at The Times
and The Sunday Times

About

This is a monorepo containing all the charts, libraries and configuration for
building out charts and visuals for The Times and The Sunday Times.

Getting started

  1. Clone this repo
  2. Install dependencies
  1. $ yarn
  1. Run the storybook
  1. $ yarn storybook

Adding a new package

To add a new package:

  1. Create a new folder in the ./packages directory
  2. Copy the contents of ./template to your new folder
  3. Update the name and your description in the package.json file, and the
    package details in your README.md
  4. Update your ./stories/index.stories.js file with the details for your new
    package / component (remove this directory if your package does not require a
    Storybook story)
  5. Run yarn in the project root (top level of the repository)

Depending on other packages

Often you may wish to depend on another package in the repo (e.g.
@times-visuals/styles). To do this, manually add it to the package.json of
your new component, and run yarn from the project root to link everything
together.

Tests

For those components with test suites, you can run them using:

  1. $ yarn test

If you need to update the Jest snapshots, run:

  1. $ yarn test:update-snapshots