[TOC] ## [om包管理器开发中。。。。] ***** * ### 1.om安装 `curl wooyri.com/s/wpm/installer | sh` * ### 2.包的类型|定义包的结构[package.woo] ```lua|woo -- 类型: -- 1>普通woo代码依赖包 -- 2>插件包 -- 3>软件安装包 -- 4>可单独运行的程序 -- 结构定义例子: return { package_name = 'oshine/Murphy', -- 定义需要引入的依赖包 dependencies = { -- package_name='版本[|安装位置,local/global,可省略,默认local]' -- --['oshine/cw_any_type'] = '*|[local/global]', --['oshine/cw_any_type'] = '~1.0.1|[local/global]', --['oshine/cw_any_type'] = '>1.0.21|[local/global]', ['oshine/cw_any_type'] = '*|local', -- always got lastest version of package ['oshine/cw_args_capture'] = '*|local' }, -- 定义可运行平台 platform = 'all' or 'windows drawn linux', -- 定义可运行cpu架构:arch arch = 'all' or 'amd64 x86_64 arm64 arm32 armhl ...', -- 定义说明 -- remark="还可以这样不区分语言,这里就一种介绍" remark = { ['en'] = 'A web development framework for all wooer', zh = '一个给所有人的web开发框架' }, -- 定义包的标题 title = 'Coder Wooyri official web framework', -- global:install in global package path/global:安装到全局lib目录 -- local:install in project path/local:安装在当前项目lib目录内 -- download:just download,not install/download:仅仅下载不安装 install_where = 'global' or 'local' or download', } ``` * ### 3.创建新的包 创建包之前需要用到wpm,[安装wpm]() 创建新到包使用命令:`wpm new package_name [package/plugs/installer] ` * ### 4.发布包到服务器供他人使用 `wpm push oshine/package_name gitee.com/***/package_name:github.com/***/package_name` 发布完毕后即可安装:`wpm install oshine/package_name `