Skip to content

Commit

Permalink
Merge pull request #25 from chrisvander/modernize-lib
Browse files Browse the repository at this point in the history
modernize lib
  • Loading branch information
chrisvander authored Aug 22, 2024
2 parents b0aed6f + 505f0d6 commit 6515aa2
Show file tree
Hide file tree
Showing 41 changed files with 97 additions and 14,825 deletions.
8 changes: 0 additions & 8 deletions .eslintrc.json

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Test & Build

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
test-and-build:
name: Test & Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun i && bun test && bun run build
release-please:
name: Release Please
runs-on: ubuntu-latest
steps:
- id: release
uses: google-github-actions/release-please-action@v3
with:
release-type: node
package-name: zustand-computed
release:
name: Create NPM Release
runs-on: ubuntu-latest
needs: [release-please, test-and-build]
if: ${{ needs.release-please.outputs.release_created }}
steps:
- uses: actions/checkout@v2
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bunx npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
33 changes: 0 additions & 33 deletions .github/workflows/release-please.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/release.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .prettierrc

This file was deleted.

6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ zustand-computed is a lightweight, TypeScript-friendly middleware for the state
## Install

```bash
# one of the following
npm i zustand-computed
pnpm i zustand-computed
bun add zustand-computed
yarn add zustand-computed
```

Expand Down Expand Up @@ -98,7 +102,7 @@ A fully-featured example can be found under the "example" directory.

Here's an example with the Immer middleware.

> [!WARNING]
> [!WARNING]
> Types may not be as you expect when using Immer, as it derives the SetState type from the output of GetState, where `zustand-computed` makes SetState only allow the regular Store and the GetState return both the store and the computed store. To access the ComputedStore inside Immer, you will need to assert the `Store` type as `Store & ComputedStore`.
```ts
Expand Down
4 changes: 0 additions & 4 deletions babel.config.js

This file was deleted.

Binary file added bun.lockb
Binary file not shown.
1 change: 0 additions & 1 deletion commitlint.config.js

This file was deleted.

1 change: 1 addition & 0 deletions commitlint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default { extends: ["@commitlint/config-conventional"] };
23 changes: 0 additions & 23 deletions example/.gitignore

This file was deleted.

46 changes: 0 additions & 46 deletions example/README.md

This file was deleted.

46 changes: 0 additions & 46 deletions example/package.json

This file was deleted.

Binary file removed example/public/favicon.ico
Binary file not shown.
43 changes: 0 additions & 43 deletions example/public/index.html

This file was deleted.

Binary file removed example/public/logo192.png
Binary file not shown.
Binary file removed example/public/logo512.png
Binary file not shown.
25 changes: 0 additions & 25 deletions example/public/manifest.json

This file was deleted.

3 changes: 0 additions & 3 deletions example/public/robots.txt

This file was deleted.

38 changes: 0 additions & 38 deletions example/src/App.css

This file was deleted.

9 changes: 0 additions & 9 deletions example/src/App.test.tsx

This file was deleted.

Loading

0 comments on commit 6515aa2

Please sign in to comment.