yavorsky / riot-brunch

Adds Riot.js support to brunch
14 stars 15 forks source link

use Riot Tag or Jade Template? #6

Closed crapthings closed 8 years ago

crapthings commented 8 years ago
  plugins:
    on: ["riot"]
    riot:
      extension: 'tag'   # pattern overrides extension
      pattern: /\.tag$/  # default
      template: 'jade'
      type: 'coffeescript'

config template is using jade

is that mean write jade and coffeescript in template.tag ?

crapthings commented 8 years ago
app

    h1(onclick={handleClick}) jade { value }

    script.
        console.log 2
        @handleClick = ->
            alert 1

this is my tag code, when i click h1, i get

(index):12 Uncaught SyntaxError: Unexpected identifier
crapthings commented 8 years ago

it works

app

    h1(onclick='{handleClick}') jade { value }

    style
        body
            color red

    script.
        @value = 1
        @handleClick = ->
            alert 1