प्रोजेक्ट टेम्पलेट·Pro
सादे JavaScript में टू-डू लिस्ट
सादे JavaScript मॉड्यूल से बनी टू-डू लिस्ट: जोड़ें, वहीं संपादित करें, टिक करें, फ़िल्टर करें और पूरे हुए हटाएँ; सूची localStorage में सेव रहती है। लॉजिक के लिए Node के टेस्ट रनर वाले टेस्ट हैं। DevBrowser और ऐप के अपने Node.js में चलती है, Linux की ज़रूरत नहीं।
इसे इंस्टॉल करने के लिए PocketCode Pro चाहिए।
अगर आपके Android डिवाइस पर PocketCode इंस्टॉल है, तो यह पेज ऐप में खुलेगा।
प्रीव्यू
फ़ाइलें
README.md
index.html
package.json
src/app.js
src/storage.js
src/todos.js
styles.css
test/todos.test.jsREADME.md
# To-do list in plain JavaScript A to-do list that runs in the browser with no framework and no build step: add, edit in place, tick off, filter and clear done items. The list is saved in the browser (localStorage). The logic lives in its own module with tests that run on Node's built-in test runner. ## Run it in PocketCode 1. Open `index.html` in the editor. 2. Tap the globe icon (DevBrowser) at the top of the editor. The app opens from the local preview server. 3. Add a few items and reload: they are still there. You don't need the Linux environment for this project. ## Run the tests - Open `test/todos.test.js` and tap Run. The app's own Node.js runs the file and prints each test with ok or not ok. - Or, in the terminal with the Linux environment and Node.js: `npm test`. ## Where things are | Path | What it does | |---|---| | `index.html` | The page and its form | | `styles.css` | Styles, with light and dark colours | | `src/todos.js` | The logic: plain functions, no DOM, easy to test | | `src/storage.js` | Saving and loading from localStorage | | `src/app.js` | Connects the page to the logic and draws the list | | `test/todos.test.js` | Tests for `src/todos.js` | ## Ideas to extend it - Add a due date: a new field in `addTodo`, a date input in the form and a test for it. - Drag to reorder: keep an `order` number on each item and sort by it in `visibleTodos`.1.0.0 में बदलाव
पहला संस्करण।