Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI

on:
pull_request:

jobs:
discover-packages:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.packages.outputs.packages }}
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Build package matrix
id: packages
shell: bash
run: |
packages_json=$(find ./packages -mindepth 1 -maxdepth 1 -type d -exec basename {} \; | sort | jq -R -s -c 'split("\n") | map(select(length > 0))')
echo "packages=${packages_json}" >> "$GITHUB_OUTPUT"

test-and-typecheck:
needs: discover-packages
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package: ${{ fromJson(needs.discover-packages.outputs.packages) }}
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup Node
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: npm

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm test -- packages/${{ matrix.package }}

- name: Run typecheck
run: npm --workspace ./packages/${{ matrix.package }} run typecheck

- name: Run build
run: npm --workspace ./packages/${{ matrix.package }} run build
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
node_modules
coverage
cjs
esm
typings
dist
*.log
.yarn
storybook-static
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/krypton
16 changes: 0 additions & 16 deletions .storybook/main.js

This file was deleted.

11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"cSpell.words": ["yoctocolors"]
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 Mike Simmonds
Copyright (c) 2026 Mike Simmonds

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ A modular collection of React hooks.

🦄 TypeScript support • 🐐 Fully tested • 👾 Server rendering compatible

![Travis](https://img.shields.io/travis/com/simmo/hooks?style=flat-square)
![Netlify](https://img.shields.io/netlify/ec8abac0-d0d3-4928-8f30-15163c256eb0?style=flat-square)
![License](https://img.shields.io/github/license/simmo/hooks?style=flat-square)

## Help

Run `yarn go`
Run `npm start`

## Packages

Expand All @@ -24,7 +22,7 @@ See `./packages/*` for individual package installation details.
| [@hooks/interval](packages/interval) | ![npm](https://img.shields.io/npm/v/@hooks/interval?style=flat-square) | React hook to wrap setInterval |
| [@hooks/media-query](packages/media-query) | ![npm](https://img.shields.io/npm/v/@hooks/media-query?style=flat-square) | React hook to respond to media queries |
| [@hooks/mount](packages/mount) | ![npm](https://img.shields.io/npm/v/@hooks/mount?style=flat-square) | React hook to execute callback on component mount |
| [@hooks/network-status](packages/network-status) | ![npm](https://img.shields.io/npm/v/@hooks/network-status?style=flat-square) | React hook return network status details |
| [@hooks/network-status](packages/network-status) | ![npm](https://img.shields.io/npm/v/@hooks/network-status?style=flat-square) | React hook to return network status details |
| [@hooks/previous](packages/previous) | ![npm](https://img.shields.io/npm/v/@hooks/previous?style=flat-square) | React hook to remember a value between renders |
| [@hooks/queue](packages/queue) | ![npm](https://img.shields.io/npm/v/@hooks/queue?style=flat-square) | React hook to manage a queue |
| [@hooks/raf](packages/raf) | ![npm](https://img.shields.io/npm/v/@hooks/raf?style=flat-square) | React hook to wrap requestAnimationFrame |
Expand Down
8 changes: 0 additions & 8 deletions lerna.json

This file was deleted.

7 changes: 0 additions & 7 deletions netlify.toml

This file was deleted.

Loading