Skip to content

Instantly share code, notes, and snippets.

@giann
Created May 29, 2019 06:23
Show Gist options
  • Save giann/15ac5b21fb2567f32bedcf2ae3586a2d to your computer and use it in GitHub Desktop.
Save giann/15ac5b21fb2567f32bedcf2ae3586a2d to your computer and use it in GitHub Desktop.
Vue SFC with Fengari
<template>
<div class="hello">{{ world | capitalize }}</div>
</template
<script lang="lua">
local helpers = require "@/js-helpers.lua"
local Object = helpers.Object
local Array = helpers.Array
return Object {
name = "example",
data = function()
return Object {
world = "world"
}
end,
filters = Array {
capitalize = function(self, value)
return string.upper(value)
end
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment