Skip to content

Commit

Permalink
feat(tapable): add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
hua-bang committed Aug 28, 2024
1 parent ab4df8f commit 98f59e4
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions packages/tapable/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Tapable

Just a little module for plugins.


## usage

```ts
import { SyncHook } from "../../src/index";

const hook = new SyncHook(["arg1"]);

hook.tap("event1", (...args) => {
console.log("event1", ...args);
});

hook.tap("event2", (...args) => {
console.log("event2", ...args);
});

hook.call("hua hua");
```

0 comments on commit 98f59e4

Please sign in to comment.