{"id":16039974,"url":"https://github.com/sonofmagic/simple-cloudbase","last_synced_at":"2025-03-18T04:30:53.685Z","repository":{"id":45957832,"uuid":"424459046","full_name":"sonofmagic/simple-cloudbase","owner":"sonofmagic","description":"simple-cloudbase ，给小程序云开发带来现代化的工程能力","archived":false,"fork":false,"pushed_at":"2023-12-15T11:34:58.000Z","size":1102,"stargazers_count":5,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"dev","last_synced_at":"2025-02-28T06:58:41.007Z","etag":null,"topics":["cloudbase","miniprogram","scf","serverless","tencent-cloud"],"latest_commit_sha":null,"homepage":"https://cloudbase.icebreaker.top","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sonofmagic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2021-11-04T03:22:22.000Z","updated_at":"2022-07-01T06:46:55.000Z","dependencies_parsed_at":"2023-12-15T12:48:27.280Z","dependency_job_id":null,"html_url":"https://github.com/sonofmagic/simple-cloudbase","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/sonofmagic%2Fsimple-cloudbase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonofmagic%2Fsimple-cloudbase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonofmagic%2Fsimple-cloudbase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonofmagic%2Fsimple-cloudbase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sonofmagic","download_url":"https://codeload.github.com/sonofmagic/simple-cloudbase/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243902293,"owners_count":20366258,"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":["cloudbase","miniprogram","scf","serverless","tencent-cloud"],"created_at":"2024-10-08T23:09:19.266Z","updated_at":"2025-03-18T04:30:53.364Z","avatar_url":"https://github.com/sonofmagic.png","language":"TypeScript","readme":"# simple-cloudbase\n\n\u003e 微信云开发的收费模式，即将迎来调整，添加了最低月费和按DAU收费，这背离了 serverless 的初衷\n\n\u003e 2022年7月4日，[微信云开发计费调整公告](https://developers.weixin.qq.com/community/minihome/doc/0000a680588d3891fa2ec250c51401?source=indexnew)，涨幅高达50倍！！还能给个人开发者使用吗？\n\n这是一个为微信云开发定制的框架,结合 `@cloudbase/cli`使用来完成云函数的工程化\n\n[**文档在此**](https://cloudbase.icebreaker.top/)\n\n## 前言\n\n微信云开发中的云函数，能获取微信的上下文以及 调用 `openapi`的能力，这些都是它独有的优势。(相比原生的 `SCF`)\n\n但是官方提供的解决方案，无论是 `微信IDE`，还是 `Cloudbase` ，开发体验都欠佳。\n\n这个框架，就是把 `Cloudbase` 作为一个辅助的 `CLI` 部署工具，再结合这套框架进行部署，来改善微信云开发的体验。\n\n## 目的\n\n改善微信云开发的开发体验，在提升 Serverless 冷启动的同时，让工程化更加简单！\n\n## TODO LIST:\n\n- [x] `cloudbaserc.json` 自动生成\n- [x] 云函数自动打包 , `Tree shaking` , 压缩\n- [x] 特殊情况处理, (`exclude` 和 `external`) 的情况\n- [x] `Commonjs`, `ESM`, `TS` 支持\n- [x] 公共包逻辑复用\n- [] 本地调试\n- [] 部署到服务器环境(非Serverless)\n\n## 部署及调试\n\n直接使用 [CloudBase CLI](https://docs.cloudbase.net/cli-v1/intro) 作为部署工具\n\n## alias 支持\n\n直接在项目根目录下添加 `tsconfig.json` or `jsconfig.json`\n\n然后在里面添加\n\n```js\n  \"compilerOptions\": {\n    //...\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"~/*\": [\"./src/*\"]\n      //...\n    }\n    //...\n  },\n```\n\n这样在打包时，既可以使用alias，也可以顺便添加 `vscode` 智能提示，可谓是一举两得。\n\n## simple.json\n\n这个是这套工具链的配置文件，在根目录(root)里的，控制所有的函数，在函数里的，控制这个函数的配置。\n\n\u003e 在多云函数部署时，每个云函数，可以看做是一个独立的 Nodejs 项目\n\n## 原理\n\n[抛砖引玉：一种改善微信云开发 , 开发者体验的思路](https://zhuanlan.zhihu.com/p/353260521)\n\n[抛砖引玉(2): Cloudbase Framework 助力改善微信云开发的体验](https://zhuanlan.zhihu.com/p/382756909)\n\n[抛砖引玉(3): 微信云开发最佳实践](https://zhuanlan.zhihu.com/p/412573059)\n\n[serverless 降低冷启动时间的探索 - 服务端打包 node_modules](https://zhuanlan.zhihu.com/p/407434947)\n## 非微信环境\n\n个人使用的是 `serverless framework`\n\n有关 `serverless` 的问题， 感兴趣可以关注我的[知乎](https://www.zhihu.com/people/richard-40-19-41)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonofmagic%2Fsimple-cloudbase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonofmagic%2Fsimple-cloudbase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonofmagic%2Fsimple-cloudbase/lists"}