From 07323e078fdd60814ed61a65d6756e23cf523400 Mon Sep 17 00:00:00 2001 From: Grant Timmerman Date: Mon, 4 May 2020 10:33:40 -0700 Subject: [PATCH] docs: organize README badges and remove TS example (#112) Signed-off-by: Grant Timmerman --- README.md | 76 +++++++++---------------------------------------------- 1 file changed, 12 insertions(+), 64 deletions(-) diff --git a/README.md b/README.md index d3b81a5d..9e6e51f2 100644 --- a/README.md +++ b/README.md @@ -1,80 +1,25 @@ -[![licence](https://img.shields.io/github/license/cloudevents/sdk-javascript)](http://www.apache.org/licenses/LICENSE-2.0) +# JavaScript SDK for CloudEvents + [![Codacy Badge](https://api.codacy.com/project/badge/Grade/bd66e7c52002481993cd6d610534b0f7)](https://www.codacy.com/app/fabiojose/sdk-javascript?utm_source=github.com&utm_medium=referral&utm_content=cloudevents/sdk-javascript&utm_campaign=Badge_Grade) [![Codacy Badge](https://api.codacy.com/project/badge/Coverage/bd66e7c52002481993cd6d610534b0f7)](https://www.codacy.com/app/fabiojose/sdk-javascript?utm_source=github.com&utm_medium=referral&utm_content=cloudevents/sdk-javascript&utm_campaign=Badge_Coverage) [![Build Status](https://travis-ci.org/cloudevents/sdk-javascript.svg?branch=master)](https://travis-ci.org/cloudevents/sdk-javascript) [![downloads](https://img.shields.io/npm/dy/cloudevents-sdk.svg)](https://www.npmjs.com/package/cloudevents-sdk) [![npm version](https://img.shields.io/npm/v/cloudevents-sdk.svg)](https://www.npmjs.com/package/cloudevents-sdk) -[![dependencies](https://david-dm.org/cloudevents/sdk-javascript.svg)](https://david-dm.org/cloudevents/sdk-javascript) [![vulnerabilities](https://snyk.io/test/github/cloudevents/sdk-javascript/badge.svg)](https://snyk.io/test/github/cloudevents/sdk-javascript) +[![licence](https://img.shields.io/github/license/cloudevents/sdk-javascript)](http://www.apache.org/licenses/LICENSE-2.0) -# sdk-javascript - -Official CloudEvents' SDK for JavaScript. -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 +- v1.0 -### 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