docs: organize README badges and remove TS example (#112)
Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>
This commit is contained in:
parent
223a7c6f03
commit
07323e078f
76
README.md
76
README.md
|
@ -1,80 +1,25 @@
|
|||
[](http://www.apache.org/licenses/LICENSE-2.0)
|
||||
# JavaScript SDK for CloudEvents
|
||||
|
||||
[](https://www.codacy.com/app/fabiojose/sdk-javascript?utm_source=github.com&utm_medium=referral&utm_content=cloudevents/sdk-javascript&utm_campaign=Badge_Grade)
|
||||
[](https://www.codacy.com/app/fabiojose/sdk-javascript?utm_source=github.com&utm_medium=referral&utm_content=cloudevents/sdk-javascript&utm_campaign=Badge_Coverage)
|
||||
[](https://travis-ci.org/cloudevents/sdk-javascript)
|
||||
[](https://www.npmjs.com/package/cloudevents-sdk)
|
||||
[](https://www.npmjs.com/package/cloudevents-sdk)
|
||||
[](https://david-dm.org/cloudevents/sdk-javascript)
|
||||
[](https://snyk.io/test/github/cloudevents/sdk-javascript)
|
||||
[](http://www.apache.org/licenses/LICENSE-2.0)
|
||||
|
||||
# sdk-javascript
|
||||
|
||||
Official CloudEvents' SDK for JavaScript.
|
||||
|
||||
<img src="https://github.com/cncf/artwork/blob/master/projects/cloudevents/horizontal/color/cloudevents-horizontal-color.png" width="300" height="58" alt="CloudEvents logo">
|
||||
The CloudEvents SDK for JavaScript.
|
||||
|
||||
## Status
|
||||
|
||||
This SDK is still considered a work in progress, therefore things might (and
|
||||
will) break with every update.
|
||||
This SDK is still considered a work in progress.
|
||||
|
||||
This SDK current supports the following versions of CloudEvents:
|
||||
|
||||
- v1.0
|
||||
|
||||
**Checkout the [changelog](./CHANGELOG.md) to see what's going on!**
|
||||
|
||||
## Contributing
|
||||
|
||||
Before create an awesome PR, please read our [guidelines](./CONTRIBUTING.md).
|
||||
|
||||
## Examples
|
||||
|
||||
To see working examples, point to [examples](./examples).
|
||||
|
||||
## :newspaper: Newsletter :newspaper:
|
||||
|
||||
> all the API developed before, for 0.1 and 0.3, works as the same.
|
||||
|
||||
Checkout the new expressive additions.
|
||||
|
||||
### Use typed CloudEvents in your Typescript project
|
||||
|
||||
> There is full example: [typescript-ex](./examples/typescript-ex)
|
||||
|
||||
```ts
|
||||
import CloudEvent, {
|
||||
event,
|
||||
StructuredHTTPEmitter,
|
||||
BinaryHTTPEmitter,
|
||||
|
||||
StructuredHTTPReceiver,
|
||||
BinaryHTTPReceiver
|
||||
} from 'cloudevents-sdk/v1';
|
||||
|
||||
let myevent: CloudEvent = event()
|
||||
.source('/source')
|
||||
.type('type')
|
||||
.dataContentType('text/plain')
|
||||
.dataschema('http://d.schema.com/my.json')
|
||||
.subject('cha.json')
|
||||
.data('my-data')
|
||||
.addExtension("my-ext", "0x600");
|
||||
|
||||
// . . .
|
||||
|
||||
```
|
||||
|
||||
## Versioning
|
||||
|
||||
### Before Spec reaches 1.0
|
||||
|
||||
- `0.x.p`: where `x` relates to spec version and `p` relates to fixes, releases
|
||||
and breaking changes
|
||||
|
||||
### After Spec reaches 1.0
|
||||
|
||||
- `x.M.p`: where `x` relates to spec version, `M` relates to minor and `p` relates
|
||||
to fixes. See [semver](https://semver.org/)
|
||||
**Checkout the [changelog](CHANGELOG.md) to see what's going on!**
|
||||
|
||||
## Installation
|
||||
|
||||
|
@ -109,8 +54,6 @@ These are the supported specifications by this version.
|
|||
|
||||
## How to use
|
||||
|
||||
> If you want old examples, they are [here](./OLDOCS.md)
|
||||
|
||||
### Usage
|
||||
|
||||
```js
|
||||
|
@ -331,6 +274,11 @@ Receiver.check(Object, Map)
|
|||
CloudEvent Receiver.parse(Object, Map)
|
||||
```
|
||||
|
||||
## Versioning
|
||||
|
||||
- `x.M.p`: where `x` relates to spec version, `M` relates to minor and `p` relates
|
||||
to fixes. See [semver](https://semver.org/)
|
||||
|
||||
## Community
|
||||
|
||||
- There are bi-weekly calls immediately following the [Serverless/CloudEvents
|
||||
|
|
Loading…
Reference in New Issue