This demonstrates how to use ES6 in your tags using the in-browser compiler.
If you use ES6, TypeScript, CoffeeScript, or any JavaScript pre-processor, it will override the one built in to Riot.
That means you will lose the shorthand syntax. So this:
getMessage() { ... }
Becomes (using ES6):
this.getMessage = function () { ... }
// or
this.getMessage = () => { ... }
Please don't use in-browser Babel for production. Read the Riot docs for prebuilt ES6 tags.
Install superstatic if you don't have.
$ npm install -g superstatic
Download or clone this repo, then run the command.
$ cd to/this/dir
$ superstatic
Open the URL shown in your browser.