aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorJan T <jans.tuomi@gmail.com>2018-03-03 17:27:21 +0200
committerJan Tuomi <jan.tuomi@eficode.com>2018-03-03 17:28:42 +0200
commitf050e5fdbfefe13f59bfca6bfdbc787ac06a53d2 (patch)
tree70f96d4ee3c31b8edacbd1d7ab413efaadd26f0c /README.md
Initial commit
Diffstat (limited to 'README.md')
-rw-r--r--README.md52
1 files changed, 52 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..ab2ea55
--- /dev/null
+++ b/README.md
@@ -0,0 +1,52 @@
+# Vigilante
+
+## Example
+
+app.tag
+```jsx
+<app>
+ <counter />
+ <push-button />
+
+ <script>
+ import { observe } from 'vigilante';
+ </script>
+</app>
+```
+
+counter.tag
+```jsx
+<counter>
+ <h3>Times clicked: { count }</h3>
+ <push-button />
+
+ <script>
+ this.count = 0;
+ const counter = this;
+
+ observe('clicker').on('click', () => {
+ counter.count += 1;
+ counter.update();
+ });
+ </script>
+</counter>
+```
+
+push-button.tag
+```jsx
+<push-button>
+ <button onclick={ click }>Click me!</button>
+
+ <script>
+ click() {
+ observe('clicker').trigger('click');
+ }
+ </script>
+</push-button>
+```
+
+## Get it
+
+```shell
+yarn install vigilante
+``` \ No newline at end of file