{"id":13682041,"url":"https://github.com/im3x/Scriptables","last_synced_at":"2025-04-30T06:33:29.685Z","repository":{"id":37356052,"uuid":"302564167","full_name":"im3x/Scriptables","owner":"im3x","description":"iOS14桌面组件神器（Scriptable）开发框架、教程、精美脚本分享","archived":false,"fork":false,"pushed_at":"2023-03-11T12:10:26.000Z","size":9613,"stargazers_count":1465,"open_issues_count":11,"forks_count":246,"subscribers_count":88,"default_branch":"v2-dev","last_synced_at":"2024-11-11T22:41:51.269Z","etag":null,"topics":["ios-widget","ios14","ios14-widget","scriptable","scriptables"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/im3x.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-10-09T07:19:43.000Z","updated_at":"2024-11-11T15:23:33.000Z","dependencies_parsed_at":"2024-01-14T15:26:46.313Z","dependency_job_id":"4c0d39db-6634-4bdc-8874-3094e1c80a92","html_url":"https://github.com/im3x/Scriptables","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/im3x%2FScriptables","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/im3x%2FScriptables/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/im3x%2FScriptables/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/im3x%2FScriptables/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/im3x","download_url":"https://codeload.github.com/im3x/Scriptables/tar.gz/refs/heads/v2-dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224201833,"owners_count":17272650,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ios-widget","ios14","ios14-widget","scriptable","scriptables"],"created_at":"2024-08-02T13:01:39.590Z","updated_at":"2024-11-12T01:30:54.210Z","avatar_url":"https://github.com/im3x.png","language":"JavaScript","readme":"# 「小件件」开发框架\n\n\u003e iOS 小组件快速开发框架 / 模板 / 小组件源码  👉 for [Scriptable](https://scriptable.app)    \n\u003e [查看老版本（main分支）](https://github.com/im3x/Scriptables/tree/main)\n\n# 介绍\n这是一个便于开发者在电脑上开发、测试、预览 iOS 小组件（Scriptable）的开发框架    \n通过简单安装，就可以获得一个舒适的Scriptable脚本开发环境，支持语法高亮、自动补全、实时同步测试预览。    \n不用再在手机上敲代码了！并且该开发框架封装了很多常用的操作接口，让开发者专注数据解析+小组件UI设计，大大节省开发时间！\n\n# 开始\n**首先，我们配置电脑开发环境：**    \n1. 下载安装 VSCode 编辑器\n2. 下载本项目的`v2-dev`分支zip或代码：`git clone -b v2-dev https://github.com/im3x/Scriptables.git`    \n   （⚠️注意要加`-b`参数指定分支）    \n3. VSCode打开代码目录，进入终端，运行安装依赖命令：`npm install`    \n4. 安装好依赖，开启开发服务命令：`npm start`    \n\n\u003e ⚠️ 提示： windows 用户请存放源码到用户目录，比如 `C:\\Users\\xxx\\Scriptables`，否则可能会引发权限问题导致运行失败\n\n**然后，配置手机运行环境：**    \n1. 运行服务后，会输出地址，手机访问该地址即可按照步骤初始化。或手动复制 [install-runtime.js](install-runtime.js) 脚本代码，打开 `Scriptable` 应用，点击右上角➕，粘贴代码，点击运行    \n2. 如果成功，应该新加了两个插件文件：`「小件件」开发环境`、「`源码」小组件示例`    \n3. 点击 `「源码」小组件示例` 或者其他任何基于此框架开发的小组件，点击操作菜单的远程开发，即可连接电脑，开启远程开发体验！    \n\n\n\n# 发布\n\n开发测试完毕后，可以 `pull` 到本分支进行开源分享    \n小组件源码存放在 [Scrips](Scripts) 目录，你也可以复制其他的小组件进行修改使用。    \n\n\n**打包分享**： 你可以使用如下命令，打包你的小组件成一个单独的文件，从而可以分享给其他用户使用：\n``` bash\n$ node pack.js Scripts/「源码」你的小组件.js\n```\n\u003e 将会生成在 `Dist` 目录\n\n**压缩代码**：打包的文件过大，如果需要压缩减少体积、加密敏感信息，可以通过如下脚本处理打包后的文件：\n``` bash\n$ node encode.js Dist/「小件件」你的小组件.js\n```\n\u003e 将会在 `Dist` 目录生成 `「小件件」你的小组件.enc.js` 文件    \n\u003e 该脚本需要`javascript-obfuscator`库，如未安装请先在项目目录 `npm install`\n\n\n微信小程序「小件件」 后续会开放开发者中心，开发者到时候可以上传、发布、出售自己的原创小组件。    \n目前测试中，敬请关注！    \n\n开发讨论交流群：https://x.im3x.cn/images/qun1.jpeg\n\n\n![](https://x.im3x.cn/images/qr2.png)\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fim3x%2FScriptables","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fim3x%2FScriptables","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fim3x%2FScriptables/lists"}