-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.json
22 lines (22 loc) · 1.7 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
"name": "ezgui",
"version": "0.2.0",
"description": "You make an XML file that contains your GUI definition, just like single file components in Vue.js.\r A root Layout element is mandatory.\r ```xml\r <Layout>\r <Button @click=\"a_method('with a string arg')\">Click me!</Button>\r <Text forEach=\"element in collection\">{{ element }}</Text>\r </Layout>\r <Style>\r Layout {\r direction: vertical;\r padding: 2;\r }\r Layout > Button {\r margin: [button_margin]; // Can also databind to CSS properties!\r }\r </Style>\r ```\r Then in your init.lua you can render this GUI:\r ```lua\r -- Dofiling EZGUI.lua returns a table with an init function that you need to call and pass in the path to the library, which in turn will return a render function you can call to render a GUI\r local render_gui = dofile_once(\"mods/your_mod_id/lib/EZGUI/EZGUI.lua\").init(\"mods/your_mod_id/lib/EZGUI\")\r -- This is the data context table, here lives your data that you can bind to\r local data = {\r collection = { \"Bloo\", \"Blaa\", \"Blee\" },\r button_margin = 5,\r -- Methods defined here can be used in @click, arg1 is the data_context itself, arg2 the element that was clicked, arg3 the first custom arg\r a_method = function(data, element, arg1)\r print(arg1)\r end,\r }",
"main": "build.js",
"directories": {
"lib": "lib"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "TheHorscht <[email protected]> (https://github.com/TheHorscht)",
"license": "ISC",
"dependencies": {
"@octokit/core": "^3.6.0",
"adm-zip": "^0.5.9",
"axios": "^0.27.2",
"dotenv": "^16.0.1",
"minimatch": "^5.0.1",
"uri-template": "^2.0.0"
}
}