Skip to content

About

component library for SWR Data Lab interactives

Topics

Resources

Stars

0 stars

Watchers

2 watching

Forks

Repository files navigation

Chart Components

Svelte/kit component library for SWR Data Lab charts and interactives.

Package version Map package version deploy storybook component tests e2e tests release components release components-map

Usage

  • Run npm i --save @swr-data-lab/components to install the base component package
  • Run npm i --save @swr-data-lab/components-map to install the maplibre component package
  • See Storybook for component-level usage examples and documentation.

Contributing

Project structure

  1. /components: Publishable package @swr-data-lab/components with general components, utility scripts, and other reusable assets.
  2. /components-map: Publishable package @swr-data-lab/components-map with the maplibre map components and basemap styles.
  3. /storybook: Private Storybook workspace for previewing and component testing. Stories stay colocated with their components in the two packages; this workspace only hosts the Storybook configuration and tooling. Run npm run storybook --workspace=storybook to start it.
  4. /mock-sveltekit: Sample SvelteKit application for e2e testing and developing the configuration needed to deploy our apps to SWR.de and the SWR Aktuell native app.
  5. /mock-sophora: Testing environment designed to mimic the SWR.de environment, featuring defunkt/jquery-pjax navigation, global styles and server-side includes.
  6. /sophora-components: Experimental components that are intended to be used directly within SWR.de articles and pages via the "Datenjournalismus" module in the Sophora CMS.

Release workflow

  • We use semantic-release to create releases and publish to npm on commit to main. Each publishable package is released independently with its own git tag prefix (components-v* and components-map-v*), triggered by changes under its directory.
  • Only conventional commits trigger new releases. Prefix your commit message with fix: for a patch, feat: for a minor and !: for a major version bump. See also semantic-release docs.

About

component library for SWR Data Lab interactives

Topics

Resources

Stars

0 stars

Watchers

2 watching

Forks

Used by

Contributors

Languages