]> git.r.bdr.sh - rbdr/api-notation.vscode/blame - README.md
Update install info and readme
[rbdr/api-notation.vscode] / README.md
CommitLineData
e6c2e653 1# API Notation Syntax for Atom
45491641 2
e6c2e653
BB
3This is a grammar for api notation, a simple notation I've been using for
4annotating module APIs in specs and other documents.
5
6## Installing
7
8### From Command Line
9
72beb828 10`code --install-extension rbdr.api-notation`
891e104e
BB
11
12### From GUI
13
14#### Open the Extension Manager from Palette Manager
15
161. Press `⌘⇧P` on OSX or `⌃⇧P` on Windows/Linux to open the palette manager
172. Look for `Install Ext4ensions
18
19#### Open the Package Manager from Preferences
20
211. Go to `Code -> Preferences -> Extensions` menu item
22
23#### Install it
24
251. Search for `api-notation` in the search bar
262. Click Install
27
e6c2e653
BB
28
29## Usage
30
31Open a `.api` file, or set it as your syntax.
32
33## API Notation Reference
34
35The most recent reference as of now is in this [gist][api-reference], so
36check that to be sure. But here's a reproduction of the notation.
37
38```
39NameOfClass.WithPossibleNamespace
40 + class property
41 - instance property
42 ~> listened events (socket)
43 +> listened events (class/module)
44 -> listened events (instance)
45 <~ dispatched events (socket)
46 <+ dispatched events(class/module)
47 <- dispatched events (instance)
48 :: class method
49 # instance method
50
51Other symbols
52 => returns
53->() callback return
54[xx] optional
55<xx> data type
56
57Recommended order: class first, then sockets, then instance. Internally:
58Properties, events, methods.
59
60// Anything after two forward slashes is a comment
61```
62
63## How does it look like?
64
65Like this.
66
67![Like this.][api-example]
68
69[api-reference]: https://gist.github.com/rbdr/4694c46fcec131468e34
70[api-example]: https://i.imgur.com/63TyFMe.png