{"id":20842191,"url":"https://github.com/oustn/scriptwriters","last_synced_at":"2025-05-08T22:41:19.751Z","repository":{"id":175518644,"uuid":"653967423","full_name":"oustn/scriptwriters","owner":"oustn","description":"A simple tools for write and test quantumult scripts easier","archived":false,"fork":false,"pushed_at":"2025-03-13T00:00:03.000Z","size":837,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-03T23:02:12.664Z","etag":null,"topics":["javascript","quantumult","quantumult-x","rewrite","task","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/oustn.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-06-15T05:59:04.000Z","updated_at":"2024-03-21T09:48:37.000Z","dependencies_parsed_at":"2023-09-27T08:42:02.997Z","dependency_job_id":"f3c13f92-3531-48b9-b2c8-a9ff8d5909e2","html_url":"https://github.com/oustn/scriptwriters","commit_stats":{"total_commits":214,"total_committers":4,"mean_commits":53.5,"dds":0.4953271028037384,"last_synced_commit":"ca73b36fe8e56a5ff1e8572bea9666ad7fcfe1fa"},"previous_names":["oustn/scriptwriters"],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oustn%2Fscriptwriters","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oustn%2Fscriptwriters/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oustn%2Fscriptwriters/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oustn%2Fscriptwriters/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oustn","download_url":"https://codeload.github.com/oustn/scriptwriters/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253160727,"owners_count":21863624,"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":["javascript","quantumult","quantumult-x","rewrite","task","typescript"],"created_at":"2024-11-18T01:23:25.788Z","updated_at":"2025-05-08T22:41:19.728Z","avatar_url":"https://github.com/oustn.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scriptwriters\n\nScriptwriters 提供一系列的工具用于 Quantumult X 脚本的开发和调试，可以像开发前端项目一样使用 `typescript` 和 `npm module` 来帮助开发脚本。\n\n## 安装\n\nScriptwriters 提供两个依赖包：`@scriptwriter/cli` 和 `@scriptwriter/quantumult`，`cli` 内置了脚本的开发服务和构建功能，`quantumult` 内置了一些 API 封装。\n\n使用 [npm](http://npmjs.com/) 安装依赖。\n\n```bash\nnpm install @scriptwriter/cli --save-dev\nnpm install @scriptwriter/quantumult --save\n```\n\n## 开始使用\n\n1. 创建项目文件夹\n\n```bash\nmkdir demo-scripts\n```\n\n2. 初始化 package.json\n\n```bash\ncd demo-scripts \u0026\u0026 npm init -y\n```\n\n3. 安装依赖\n\n```bash\nnpm install @scriptwriter/cli --save-dev \u0026\u0026 npm install @scriptwriter/quantumult --save\n```\n\n4. 添加 `tsconfig.json`\n\n根据自己的需求配置。\n\n```json\n{\n  \"compilerOptions\": {\n    \"outDir\": \"./dist/\",\n    \"noImplicitAny\": true,\n    \"module\": \"es6\",\n    \"target\": \"es5\",\n    \"allowJs\": false,\n    \"strictNullChecks\": true,\n    \"moduleResolution\": \"NodeNext\",\n    \"allowSyntheticDefaultImports\": true\n  }\n}\n```\n\n5. 添加运行脚本\n\n在 package.json 中添加运行脚本：\n\n```json\n  \"scripts\": {\n    \"prebuild\": \"rm -rf dist\",\n    \"build\": \"NODE_ENV=production scriptwriter-cli build\",\n    \"dev\": \"scriptwriter-cli dev\"\n  }\n```\n\n6. 运行开发脚本\n\n```bash\nnpm run dev\n```\n\n打开控制台输出的地址，可以看到首页的效果。\n\n## 开始你的第一个脚本\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foustn%2Fscriptwriters","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foustn%2Fscriptwriters","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foustn%2Fscriptwriters/lists"}