diff options
| author | ruki <[email protected]> | 2016-03-02 10:29:35 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-03-02 10:29:35 +0800 |
| commit | 8ee46b185347f31fa6f4380c887974cdbafbb1d1 (patch) | |
| tree | d45a1505e01ffd33673eced2886626c376312097 | |
| parent | ef399ea6c252456e3f0ccb125412ced6d7735377 (diff) | |
add hello plugin
| -rwxr-xr-x | xmake/actions/config/main.lua | 22 | ||||
| -rwxr-xr-x | xmake/plugins/hello/xmake.lua (renamed from xmake/actions/config/test.lua) | 35 |
2 files changed, 24 insertions, 33 deletions
diff --git a/xmake/actions/config/main.lua b/xmake/actions/config/main.lua index 68f100cc2..b213e5e7d 100755 --- a/xmake/actions/config/main.lua +++ b/xmake/actions/config/main.lua @@ -20,30 +20,8 @@ -- @file main.lua -- -import("test") -import("core") -import("core.project") - -print("global") -print(project) -print(core.project) -print("test", test) - -function hello() - - print("hello") - print(project) - print(core.project) - test.test2() -end - function main() print("main") - print(project) - print(core.project) - - -- hello - hello() end diff --git a/xmake/actions/config/test.lua b/xmake/plugins/hello/xmake.lua index 1c02385eb..9289c2b14 100755 --- a/xmake/actions/config/test.lua +++ b/xmake/plugins/hello/xmake.lua @@ -17,20 +17,33 @@ -- Copyright (C) 2015 - 2016, ruki All rights reserved. -- -- @author ruki --- @file test.lua +-- @file hello.lua -- -import("core") -import("core.project") +-- define task +task("hello") -print("global") -print(project) -print(core.project) + -- set category + set_task_category("plugin") -function test2() + -- on run + on_task_run(function () + + -- trace + print("hello xmake!") + + end) + + -- set menu + set_task_menu({ + -- usage + usage = "xmake hello [options]" + + -- description + , description = "Hello xmake!" + + -- options + , options = {} + }) - print("test2") - print(project) - print(core.project) -end |
