From f4cf006861bf281fb74a61b22bc31e8124bebb67 Mon Sep 17 00:00:00 2001 From: samhirtarif Date: Thu, 13 Jul 2023 12:05:22 +0500 Subject: [PATCH] Add workflow badges. Add test workflow name. --- .github/workflows/test.yml | 2 +- README.md | 11 +++++++++-- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7b8efa82..6e369b7b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,5 +1,5 @@ -name: Run vitest +name: Run tests (vitest) on: push jobs: diff --git a/README.md b/README.md index ff7720c7..95d69d21 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,16 @@ An audio recording helper for React. Provides a component and a hook to help with audio recording. [![NPM downloads][npm-download-img]][npm-download-url] +[![Run ESlint][eslint-img]][eslint-url] +[![Run Unit tests][test-img]][test-url] [npm-download-img]: https://img.shields.io/npm/dm/react-audio-voice-recorder.svg?style=round-square [npm-download-url]: https://www.npmjs.com/package/react-audio-voice-recorder +[eslint-img]: https://github.com/samhirtarif/react-audio-recorder/actions/workflows/lint.yml/badge.svg +[eslint-url]: https://github.com/samhirtarif/react-audio-recorder/actions/workflows/lint.yml +[test-img]: https://github.com/samhirtarif/react-audio-recorder/actions/workflows/test.yml/badge.svg +[test-url]: https://github.com/samhirtarif/react-audio-recorder/actions/workflows/test.yml + ## Installation ```sh npm install react-audio-voice-recorder @@ -21,7 +28,7 @@ yarn add react-audio-voice-recorder ## Usage -### **AudioRecorder** Component ([Usage](https://stackblitz.com/edit/react-ts-cc5l47?file=App.tsx)) +### **AudioRecorder** Component ([See it in action](https://stackblitz.com/edit/react-ts-cc5l47?file=App.tsx)) You can use an out-of-the-box component that takes `onRecordingComplete` method as a prop and calls it when you save the recording @@ -115,7 +122,7 @@ The hook returns the following: ### Combine the **`useAudioRecorder`** hook and the **`AudioRecorder`** component This is for scenarios where you would wish to control the `AudioRecorder` component from outside the component. You can call the `useAudioRecorder` and pass the object it returns to the **`recorderControls`** of the `AudioRecorder`. This would enable you to control the `AudioRecorder` component from outside the component as well -#### Sample usage ([Working example](https://stackblitz.com/edit/react-ts-ryj6jz?file=App.tsx)) +#### Sample usage ([See it in action](https://stackblitz.com/edit/react-ts-ryj6jz?file=App.tsx)) ```js import { AudioRecorder, useAudioRecorder } from 'react-audio-voice-recorder'; diff --git a/package-lock.json b/package-lock.json index 51552786..a71ead0f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "react-audio-voice-recorder", - "version": "2.1.0", + "version": "2.1.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "react-audio-voice-recorder", - "version": "2.1.0", + "version": "2.1.1", "license": "MIT", "dependencies": { "@ffmpeg/ffmpeg": "^0.11.6", diff --git a/package.json b/package.json index 6ef7218e..ae2767fc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "react-audio-voice-recorder", "private": false, - "version": "2.1.0", + "version": "2.1.1", "type": "module", "license": "MIT", "author": "",