1 Star 2 Fork 0

吴楷鹏 / uTools 插件启动模板

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

1704943260249

uTools 插件启动模板 ⚙️

开箱即用的 uTools 插件启动模板,包含了常用的配置,可以直接开始开发 uTools 插件。

技术栈:

  1. TypeScript
    1. 包括官方 API uTool 提供的类型定义:https://github.com/uTools-Labs/utools-api-types
  2. Vite
    1. 组件自动加载
    2. 模块自动加载
    3. 文件路由支持
    4. api 自动加载
  3. Vue3
  4. PNPM
  5. Element-Plus + UnoCSS

开发教程

从零开始,一步步完成整个开发、打包和上架流程。

打开 uTools,搜索 uTools 开发者工具:

1704943011184

1704943021624

填写插件信息:

1704943038844

直接下载一个 uTools 启动模板:https://gitee.com/penggeor/utools-plugin-starter,这个模板技术栈主要为 Vite + Vue3 + TypeScript

1704943050513

克隆项目之后,将 plugin.json 文件定位到下载的项目

1704943068707

接着先启动模板项目,先用 pnpm install,然后执行 pnpm dev 启动项目:

1704943081188

然后启动 uTools 插件:

1704943089416

然后在 uTools 上就可以看到并打开我们的插件了:

1704943099984

1704943106679

接着就像开发 Web 正常流程一样开发我们的插件。

开发注意点:

  1. 如果更改了 logo,需要重启 uTools 才能生效
  2. 官方提供的 API uTools 变量已经添加 TypeScript 支持

其他问题可以查询下「猿料」社区:https://yuanliao.info/

也可以在官方公众号上去添加插件开发群咨询:

1704943119726

开发之后,使用命令 pnpm build 打包项目到 dist 文件,模板除了会打包项目, 还会把插件文件比如 plugin.jsonlogo.png 等一起放到最终的 dist 文件中:

1704943130921

然后就是点击发布版本:

1704943140271

路径记得选择为 dist

1704943148236

填写版本说明、插件应用介绍和上传插件截图:

1704943156538

接着就能看到你的发布的工具了:

1704943165989

以上就是快速开发、打包、上架一个 uTools 插件的内容。

感谢

本项目基于:https://github.com/markthree/utools-plugin-starter

其他模板项目参考:

MIT LICENSE Copyright (c) 2022 name Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

uTools 插件启动模板,技术栈为: Vite + Vue3 + Element-Plus + Unocss + TypeScript 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/penggeor/utools-plugin-starter.git
git@gitee.com:penggeor/utools-plugin-starter.git
penggeor
utools-plugin-starter
uTools 插件启动模板
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891