feat: use npm name cloudevents (#260)

BREAKING CHANGE:  This changes the modules name from cloudevents-sdk to cloudevents

* feat: use npm name cloudevents
fixes #215

Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>
This commit is contained in:
Grant Timmerman 2020-07-24 07:04:25 -07:00 committed by GitHub
parent 4b54b272a5
commit 565f867424
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -22,7 +22,7 @@ The CloudEvents SDK requires a current LTS version of Node.js. At the moment
those are Node.js 10.x and Node.js 12.x. To install in your Node.js project: those are Node.js 10.x and Node.js 12.x. To install in your Node.js project:
```console ```console
npm install cloudevents-sdk npm install cloudevents
``` ```
### Receiving and Emitting Events ### Receiving and Emitting Events
@ -37,7 +37,7 @@ binary and structured events in either the 1.0 or 0.3 protocol formats.
const { const {
CloudEvent, CloudEvent,
Receiver Receiver
} = require("cloudevents-sdk"); } = require("cloudevents");
// Create a receiver to accept events over HTTP // Create a receiver to accept events over HTTP
const receiver = new Receiver(); const receiver = new Receiver();
@ -58,7 +58,7 @@ structured events, add `Protocol.HTTPStructured` as a parameter to
`emitter.send()`. `emitter.send()`.
```js ```js
const { CloudEvent, Emitter, Protocol, Version } = require("cloudevents-sdk"); const { CloudEvent, Emitter, Protocol, Version } = require("cloudevents");
// With only an endpoint URL, this creates a v1 emitter // With only an endpoint URL, this creates a v1 emitter
const emitter = new Emitter({ const emitter = new Emitter({
@ -101,7 +101,7 @@ All created `CloudEvent` objects are read-only. If you need to update a propert
```js ```js
const { const {
CloudEvent, CloudEvent,
} = require("cloudevents-sdk"); } = require("cloudevents");
// Create a new CloudEvent // Create a new CloudEvent
const ce = new CloudEvent({...}); const ce = new CloudEvent({...});

View File

@ -1,5 +1,5 @@
{ {
"name": "cloudevents-sdk", "name": "cloudevents",
"version": "2.0.2", "version": "2.0.2",
"description": "CloudEvents SDK for JavaScript", "description": "CloudEvents SDK for JavaScript",
"main": "dist/index.js", "main": "dist/index.js",