Skip to content

Commit

Permalink
chore: remove old deps and update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
nerdyman committed Sep 23, 2023
1 parent efaeee2 commit 617c498
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 38 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ See the [Images docs](https://react-compare-slider.vercel.app/?path=/docs/docs-i
| [`onPositionChange`](https://react-compare-slider.vercel.app/?path=/story/demos--on-position-change) | `function` | | `undefined` | Callback on position change, returns current position percentage as argument `(position) => { ... }`. |
| [`portrait`](https://react-compare-slider.vercel.app/?path=/story/demos--portrait) | `boolean` | | `false` | Whether to use portrait orientation. |
| [`position`](https://react-compare-slider.vercel.app/?path=/story/demos--position) | `number` | | `50` | Initial percentage position of divide (`0-100`). |
| [`transition`](https://react-compare-slider.vercel.app/?path=/story/demos--transition) | `string` | | `undefined` | Shorthand CSS `transition` properties to apply to handle movement. |
| [`transition`](https://react-compare-slider.vercel.app/?path=/story/demos--transition) | `string` | | `undefined` | Shorthand CSS `transition` property to apply to handle movement. E.g. `.5s ease-in-out` |

[API docs](https://react-compare-slider.vercel.app/?path=/docs/docs-api--page) for more information.

Expand All @@ -101,12 +101,10 @@ See the [Images docs](https://react-compare-slider.vercel.app/?path=/docs/docs-i
## Real World Examples

- [Official GOV.UK Coronavirus Dashboard](https://coronavirus.data.gov.uk/details/interactive-map/vaccinations#vaccinations-map-container)
- [RestorePhotos.io](https://www.restorephotos.io/restore)
- [RemoveBG](https://www.removebg.dev/)
- [Upscayl, Free and Open Source AI Image Upscaler](https://github.com/upscayl/upscayl#free-and-open-source-ai-image-upscaler)
- [DevTools-X, A collection of offline first developer utilities](https://github.com/fosslife/devtools-x)
- [Counter-Strike 2 Website](https://www.counter-strike.net/cs2)

## Requirements

- React 16.8+
- The [latest two versions](./package.json#L55) of each major browser are officially supported
- The [latest two versions](./lib/package.json#L55) of each major browser are officially supported
18 changes: 10 additions & 8 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,23 @@ pnpm install-completion
To start the library in watch mode, run the following command:

```sh
# Run the library only.
pnpm run --filter react-compare-slider dev
# You can also run the scripts from the directory itself if you prefer.
cd lib
pnpm run dev
```

### Storybook

To start Storybook run the following command:

```sh
pnpm run --filter @this/storybook storybook
# Run Storybook only.
pnpm run --filter @this/storybook dev
# You can also run the scripts from the directory itself if you prefer.
cd docs/storybook
pnpm run storybook
pnpm run dev

# Run example only.
pnpm run --filter @this/example dev
# You can also run the scripts from the directory itself if you prefer.
cd docs/example
pnpm run dev
```

## Testing
Expand Down
1 change: 1 addition & 0 deletions docs/storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"keywords": [],
"license": "MIT",
"scripts": {
"dev": "pnpm run storybook",
"storybook": "rm -rf ./node_modules/.cache && storybook dev -p 6006 --ci",
"storybook:build": "storybook build",
"test": "rm -rf ./coverage && test-storybook",
Expand Down
3 changes: 0 additions & 3 deletions lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
],
"scripts": {
"dev": "concurrently -k -s first -n \"tsup,ts\" -c \"blue,cyan\" \"tsup --watch\" \"pnpm run check:types --watch --preserveWatchOutput\"",
"start": "pnpm run dev",
"build": "pnpm run check:types && NODE_ENV=production tsup",
"release": "cp ../README.md ../LICENSE . && pnpm run -w lint && pnpm run -w test && pnpm run build && pnpm run check && np --no-tests --no-cleanup",
"check": "concurrently -n \"package,types\" -c \"blue,magenta\" \"pnpm run check:package\" \"pnpm run check:types\"",
Expand Down Expand Up @@ -78,8 +77,6 @@
"react-dom": ">=16.8"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.10.2",
"@ianvs/prettier-plugin-sort-imports": "^3.7.2",
"@types/node": "^20.6.2",
"@types/react": "^18.2.21",
"@types/react-dom": "^18.2.7",
Expand Down
11 changes: 1 addition & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,10 @@
"engines": {
"node": ">=16.9.0"
},
"packageManager": "pnpm@8.7.5",
"packageManager": "pnpm@8.7.6",
"scripts": {
"bootstrap": "corepack enable && pnpm install --frozen-lockfile",
"clean": "rm -rvf ./node_modules ./docs/*/node_modules ./lib/node_modules ./coverage ./docs/*/coverage ./docs/storybook/storybook-static",
"dev": "concurrently -k -s first -n \"tsup,ts\" -c \"blue,cyan\" \"tsup --watch\" \"pnpm run check:types --watch --preserveWatchOutput\"",
"start": "pnpm run dev",
"build": "pnpm run check:types && NODE_ENV=production tsup",
"release": "pnpm run lint && pnpm run test && pnpm run build && pnpm run check && np --no-tests --no-cleanup",
"test": "rm -rf coverage && concurrently -n \"ssr,sb\" -c \"magenta,blue\" \"pnpm run test:ssr\" \"pnpm run test:storybook\"",
"test:ci": "concurrently -k -s first -n \"sb,test\" -c \"magenta,blue\" \"pnpm run --filter @this/storybook storybook:build --quiet && pnpm sirv ./docs/storybook/storybook-static --host 127.0.0.1 --port 6006\" \"pnpm wait-port 6006 && pnpm run test\"",
"test:ssr": "pnpm c8 -o ./coverage/ssr-tests -r text -r lcov node --test ./docs/ssr-tests/ssr.test.mjs",
Expand All @@ -46,19 +42,14 @@
"eslint --fix"
]
},
"np": {
"pnpm": true
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.10.2",
"@ianvs/prettier-plugin-sort-imports": "^3.7.2",
"@types/node": "^20.6.2",
"@typescript-eslint/eslint-plugin": "^6.7.0",
"@typescript-eslint/parser": "^6.7.0",
"browserslist": "^4.21.10",
"c8": "^8.0.1",
"concurrently": "^8.2.1",
"esbuild-plugin-browserslist": "^0.9.0",
"eslint": "^8.49.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
Expand Down
12 changes: 0 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 617c498

Please sign in to comment.