{"id":20071740,"url":"https://github.com/rayjune/justtodo","last_synced_at":"2026-01-30T02:03:00.916Z","repository":{"id":24266319,"uuid":"100612417","full_name":"RayJune/JustToDo","owner":"RayJune","description":"就是去做：a sample todolist web-app written by plain JavaScript","archived":false,"fork":false,"pushed_at":"2022-06-22T08:58:16.000Z","size":2516,"stargazers_count":4,"open_issues_count":9,"forks_count":0,"subscribers_count":4,"default_branch":"gh-pages","last_synced_at":"2025-01-13T00:16:03.004Z","etag":null,"topics":["indexeddb","plain-javascript","todolist"],"latest_commit_sha":null,"homepage":"https://todo.rayjune.me","language":"JavaScript","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/RayJune.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}},"created_at":"2017-08-17T14:29:30.000Z","updated_at":"2024-07-26T08:26:54.000Z","dependencies_parsed_at":"2022-08-26T12:11:55.286Z","dependency_job_id":null,"html_url":"https://github.com/RayJune/JustToDo","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/RayJune%2FJustToDo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RayJune%2FJustToDo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RayJune%2FJustToDo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RayJune%2FJustToDo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RayJune","download_url":"https://codeload.github.com/RayJune/JustToDo/tar.gz/refs/heads/gh-pages","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241502801,"owners_count":19972957,"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":["indexeddb","plain-javascript","todolist"],"created_at":"2024-11-13T14:31:49.852Z","updated_at":"2026-01-30T02:02:55.882Z","avatar_url":"https://github.com/RayJune.png","language":"JavaScript","readme":"## 一个基于 indexedDB、plain JavaScript 实现的 toDoList web-app\n\n### 就是去做\n\n#### 首页\n\n![首页](READEME_images/1.png)\n\n#### 添加 item\n\n![todolist](READEME_images/2.png)\n\n#### 随机名言警句\n\n![随机名言警句](READEME_images/3.png)\n\n#### 针对 mobile 进行优化\n\n![mobile 1](READEME_images/4.png)\n\n![mobile 2](READEME_images/5.png)\n\n### 主要功能\n\n* 使用 indexedDB 提供存储 todolist item 和随机出现的名言警句（用自己的 [indexeddb-crud](https://www.npmjs.com/package/indexeddb-crud) npm package 来操作 indexedDB）\n* 如果用户的浏览器不支持 indexedDB 则自动转换为 without indexedDB mode（[这部分代码利用 lazy load 的方式来加载](https://github.com/RayJune/JustToDo/blob/gh-pages/src/scripts/utlis/lazyLoadWithoutDB.js)）\n* 列表 item 为空则随机出现名言警句\n\n### branch 状况\n\n* gh-pages 放置最新代码的更新（默认分支，可运行）\n* dev 放置测试代码的更新（不一定可运行）\n* ES5 分支放置 ES5 的代码实现（我不会告诉你前 109 次 commit 都是纯 ES5 写的 ：》）\n\n### punchline\n\n* 不借助任何库（包括 JQuery），基于 plain JavaScript 的代码实现（约 1k 行历经多次重构的 JavaScript，前期用 ES5，后期用 ES6 重写，分离出了 ES5 分支来记录老版代码）\n* 将操作 indexedDB 的代码部分独立抽出成为一个 npm package，并发布在 npmjs.com 上（用以解决这一类问题）：https://www.npmjs.com/package/indexeddb-crud\n* 选择使用 npm scripts 配合 browserify 进行模块化打包\n* 使用 handlebars 将 view 和 data 分离，提高代码可维护性，提高页面渲染速度\n* 统一的代码风格（ESlint, AirBnB），代码品味（体现在每一行代码的处理中）\n\n### 页面设计理念\n\n整体样式模仿于[前端观察](https://www.qianduan.net)\n\n### 感谢\n\n* [Garrik-Liu 的 todolist](https://github.com/Garrik-Liu/practises-web/tree/master/cases/12.toDoList)\n* [Liugq5713 的 todolist](https://github.com/Liugq5713/Todolist)\n\n参考/模仿了两位 first commit 的代码，向两位表示感谢：）\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frayjune%2Fjusttodo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frayjune%2Fjusttodo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frayjune%2Fjusttodo/lists"}