From 111bf43e1e76ab5d17cf02fcd3d903f3be18685c Mon Sep 17 00:00:00 2001 From: Jacob Kelley Date: Mon, 1 Aug 2016 21:11:57 -0700 Subject: [PATCH] Updated logo and readme --- README.md | 34 ++++++++++++++++++++++++++++++++-- assets/postmate.sketch | 4 ++-- assets/postmate.svg | 2 +- 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a7c708ed..74190772 100644 --- a/README.md +++ b/README.md @@ -4,15 +4,35 @@ > A powerful, simple, promise-based `postMessage` library. +[![npm][npm-image]][npm-url] + +[npm-image]: https://img.shields.io/npm/v/postmate.svg?style=flat-square +[npm-url]: https://www.npmjs.com/package/postmate + +_Postmate_ is a promise-base API built on `postMessage`. It allows a parent page +to speak with a child `iFrame` across origins with minimal effort. + +You can download the compiled javascript directly [here](/build/postmate.min.js) + +* [Features](#features) * [Installing](#installing) * [Glossary](#glossary) * [Usage](#usage) * [API](#api) +* [Further Reading](#further-reading) +* [License](#license) *** +## Features +* Promise based API for elegant and simple communication +* Secure. Two way parent <-> child handshake, with origin and message validation. +* Child can expose properties, functions, or promises that the parent can retrieve. +* *Zero* dependencies. Provide your own polyfill or abstraction for the `Promise` API if needed +* Lightweight, weighing in at ~ `3kb` + ## Installing -```sh +```bash $ npm i postmate # Install via NPM $ bower i postmate # Install via Bower ``` @@ -55,6 +75,15 @@ new Postmate({ *** +## API + + +*** + +## Further Reading + +### Handshake and Initialization Flow + The Handshake and ready sequence is as follows: ``` Parent: Loading frame @@ -70,4 +99,5 @@ Parent awaiting messages... Parent Page Ready ``` -## API +## License +MIT diff --git a/assets/postmate.sketch b/assets/postmate.sketch index 2457a872..f7e4be23 100644 --- a/assets/postmate.sketch +++ b/assets/postmate.sketch @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:198b2c24cae91f5c8ad0b5972a5921f7d39acce93e73a70527fbf21ac33126fd -size 434176 +oid sha256:c4197f4d6acaf255168a8be0a17d1e883fc97b5dda7b909f507f880b837d2114 +size 466944 diff --git a/assets/postmate.svg b/assets/postmate.svg index a0e68d99..03291f9f 100644 --- a/assets/postmate.svg +++ b/assets/postmate.svg @@ -158,7 +158,7 @@ - + \ No newline at end of file