From adf428ae8f6f999d4c4ae1ba4e8ef0425948304e Mon Sep 17 00:00:00 2001 From: Simon Jockers <449739+sjockers@users.noreply.github.com> Date: Tue, 21 Oct 2025 10:54:44 +0200 Subject: [PATCH] Update README --- README.md | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 5878ec2b..ba0e76b0 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,12 @@ # SWRdata/components -Experimental component library for SWR Data Lab interactives. +Component library for SWR Data Lab interactives. -[![Deploy Storybook](https://github.com/SWRdata/components/actions/workflows/deploy-storybook.yml/badge.svg)](https://github.com/SWRdata/components/actions/workflows/deploy-storybook.yml) [![Run Storybook Tests](https://github.com/SWRdata/components/actions/workflows/test-storybook.yml/badge.svg)](https://github.com/SWRdata/components/actions/workflows/test-storybook.yml) [![Release to NPM](https://github.com/SWRdata/components/actions/workflows/release.yml/badge.svg)](https://github.com/SWRdata/components/actions/workflows/release.yml) +[![Package version](https://img.shields.io/npm/v/%40swr-data-lab%2Fcomponents)](https://www.npmjs.com/package/@swr-data-lab/components) [![Deploy Storybook](https://github.com/SWRdata/components/actions/workflows/deploy-storybook.yml/badge.svg)](https://github.com/SWRdata/components/actions/workflows/deploy-storybook.yml) [![Run Storybook Tests](https://github.com/SWRdata/components/actions/workflows/test-storybook.yml/badge.svg)](https://github.com/SWRdata/components/actions/workflows/test-storybook.yml) [![Release to NPM](https://github.com/SWRdata/components/actions/workflows/release.yml/badge.svg)](https://github.com/SWRdata/components/actions/workflows/release.yml) ## Usage -[`swr-data-lab/components`](https://www.npmjs.com/package/@swr-data-lab/components) is a private package, so installing it takes some extra steps: - -1. Ensure you're a member of the `swr-data-lab` organisation on [npm](https://www.npmjs.com/) -2. Log into npm and generate an [access token](https://docs.npmjs.com/about-access-tokens) of type `automation` -3. For local development, add the token as an environment variable using the command line: - - MacOS/Linux: `export NPM_TOKEN=[your-npm-token]` (test with `echo $NPM_TOKEN`) - - Windows: `set NPM_TOKEN=[your-npm-token]` (test with `echo %NPM_TOKEN%`) -4. For usage with Github Actions, add the token as a [repository secret](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions) called `NPM_TOKEN` -5. Add the following `.npmrc` file to your project: -``` -engine-strict=true -registry=https://registry.npmjs.org/ -@swr-data-lab:registry=https://registry.npmjs.org/ -//registry.npmjs.org/:_authToken=${NPM_TOKEN} -``` -6. Run `npm install --save @swr-data-lab/components` to install the package +Run `npm install --save @swr-data-lab/components` to install the package See also this [sample repository](https://github.com/SWRdata/components-usage-example). Refer to [Storybook](https://static.datenhub.net/apps/components/main/index.html?path=/docs/about--docs) for component-level usage examples and documentation. @@ -32,6 +17,7 @@ See also this [sample repository](https://github.com/SWRdata/components-usage-ex 1. `/components`: Central repository for reusable components, utility scripts, and other reusable assets. We use [Storybook](https://storybook.js.org/) for previewing and component-level testing. 2. `/mock-sveltekit`: Sample [SvelteKit](https://kit.svelte.dev/) application used to test our components and develop the configuration needed to build our applications for SWR.de, the SWR Aktuell native app and wherever else they need to go. 3. `/mock-sophora`: Testing environment designed to mimic the SWR.de environment, featuring [`defunkt/jquery-pjax`](https://github.com/defunkt/jquery-pjax) navigation, global styles and server-side includes. +4. `/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