Skip to content

Instantly share code, notes, and snippets.

@daurnimator
Last active June 17, 2021 11:43
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daurnimator/9dd8168ab14846e880e4b50546b39110 to your computer and use it in GitHub Desktop.
Save daurnimator/9dd8168ab14846e880e4b50546b39110 to your computer and use it in GitHub Desktop.
Playing with Vue from fengari
-- Load Vue library
package.loadlib("https://cdn.jsdelivr.net/npm/vue@2.5.13/dist/vue.js", "*")
-- Get Object helper
local Object = dofile("https://gist.githubusercontent.com/daurnimator/5a7fa933e96e14333962093322e0ff95/raw/8c6968be0111c7becc485a692162ad100e87d9c7/Object.lua").Object
local myapp = js.new(js.global.Vue, Object{
el = "#foo";
template = [[
<div id="foo">{{message}}</div>
]];
data = Object{
message = "weeee";
}
})
myapp.message = "something else"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment