From e6c2e653ab8ad7d115d29a407c99aaecb179adb1 Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Tue, 5 Feb 2019 22:01:25 +0100 Subject: Import from api-notation.tmLanguage --- README.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 99d0857..2d5e725 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,53 @@ -# API Notation for VSCode +# API Notation Syntax for Atom -Syntax Highlight Plugin for VSCode \ No newline at end of file +This is a grammar for api notation, a simple notation I've been using for +annotating module APIs in specs and other documents. + +## Installing + +### From Command Line + +TBD + +## Usage + +Open a `.api` file, or set it as your syntax. + +## API Notation Reference + +The most recent reference as of now is in this [gist][api-reference], so +check that to be sure. But here's a reproduction of the notation. + +``` +NameOfClass.WithPossibleNamespace + + class property + - instance property + ~> listened events (socket) + +> listened events (class/module) + -> listened events (instance) + <~ dispatched events (socket) + <+ dispatched events(class/module) + <- dispatched events (instance) + :: class method + # instance method + +Other symbols + => returns +->() callback return +[xx] optional + data type + +Recommended order: class first, then sockets, then instance. Internally: +Properties, events, methods. + +// Anything after two forward slashes is a comment +``` + +## How does it look like? + +Like this. + +![Like this.][api-example] + +[api-reference]: https://gist.github.com/rbdr/4694c46fcec131468e34 +[api-example]: https://i.imgur.com/63TyFMe.png -- cgit From 891e104e182102873298f898cf3edf0647d2e389 Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Tue, 5 Feb 2019 22:25:57 +0100 Subject: Add installation instructions --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 2d5e725..96309f0 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,24 @@ annotating module APIs in specs and other documents. ### From Command Line -TBD +`code --install-extension api-notation` + +### From GUI + +#### Open the Extension Manager from Palette Manager + +1. Press `⌘⇧P` on OSX or `⌃⇧P` on Windows/Linux to open the palette manager +2. Look for `Install Ext4ensions + +#### Open the Package Manager from Preferences + +1. Go to `Code -> Preferences -> Extensions` menu item + +#### Install it + +1. Search for `api-notation` in the search bar +2. Click Install + ## Usage -- cgit From 72beb828484a686f2ae318a2054ce0435ff82b26 Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Tue, 5 Feb 2019 22:31:35 +0100 Subject: Update install info and readme --- CHANGELOG.md | 1 + README.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f5deae..b8ca50c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,3 +5,4 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how ## [Unreleased] - Import from https://gitlab.com/rbdr/api-notation.tmLanguage +- Add VSCode publishing info diff --git a/README.md b/README.md index 96309f0..55e00b4 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ annotating module APIs in specs and other documents. ### From Command Line -`code --install-extension api-notation` +`code --install-extension rbdr.api-notation` ### From GUI -- cgit