Skip to content

Commit

Permalink
Merge pull request #1 from trutoo/renovate/rollup-2.x
Browse files Browse the repository at this point in the history
chore(deps): update dependency rollup to v2
  • Loading branch information
Swiftwork authored Mar 10, 2020
2 parents 76e38c8 + 987de1e commit 8fda06c
Show file tree
Hide file tree
Showing 4 changed files with 1,075 additions and 36 deletions.
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,33 @@ Then either import the side effects only exposing a `eventBus` global instance.

```javascript
import '@trutoo/event-bus';
// or
require('@trutoo/event-bus');

eventBus.register(/*...*/);
```

or import the `EventBus` class to create your own instance.

```javascript
// Global instance eventBus still created
import { EventBus } from '@trutoo/event-bus';
// or
const { EventBus } = require('@trutoo/event-bus');

const myEventBus = new EventBus();
myEventBus.register(/*...*/);
```

or using the UMD module and instance.

// No global instance created
import { EventBus } from '@trutoo/event-bus/dist/event-bus';
```html
<script src="https://unpkg.com/@trutoo/event-bus@latest/dist/index.umd.min.js"></script>
<script>
eventBus.register(/*...*/);
// or
const myEventBus = new EventBus.EventBus();
myEventBus.register(/*...*/);
</script>
```

## Usage
Expand Down
Loading

0 comments on commit 8fda06c

Please sign in to comment.